Clicking "Done" in the IDE causes an empty list in DataTable

Hello Anvil central,

I believe this is a bug report.

I have two DataTables that are linked together.

  1. In the IDE, if I click to set the value of the linked row, the full set of values is not shown (i.e., there is no “load more” in the pop-up).

  2. The bigger issue is that if I click “Done” without making any changes, the cell in question is set to an empty list.

For example:

Normally I make DB changes through code or a custom admin interface, but sometimes it is easy to manually scroll through the DataTable in the IDE and click a checkbox. In those cases I have experienced this issue.

example app:
https://anvil.works/build#clone:BRLNLD5WQJKCVZ26=JU3G4UEB6P3RBUCO6ENNPWS3

Hi Al,

Clicking “Done” should do exactly what it’s doing - you’re setting the value of a link-to-many column to “none of these rows” - ie an empty list.

However, you should be able to select any/all of the values of the linked table. That’s a bug, so I’m moving this to Bug Reports

Thank you!

I don’t agree. Instead I agree with @alcampopiano when he expects that the value will not change when the user doesn’t change anything.

Yes, the right way to cancel the dialog without changes would be to click on the “Cancel” button, but most users think “Oh, well, I don’t really want to change anything, I’m OK with whatever was in there” and they click on the “OK” button.

It’s fair for the user to expect that doing nothing and clicking “Done”, nothing will change.

It’s unfair to put the user in charge of scrolling down and checking that all the values that were in the list are visible and checked.

So, since it is impossible to show all the rows because there could be thousands, clicking “Done” without selecting or inspecting anything, should not change the value.

If the user instead clicks on any checkbox, then it’s fair to lose any selection that is not visible because the list would be too long.

(I have not tried the scenario described by Allan, I hope I understand it and my comments are in the right context)

Yes, this was my expectation as well.

When all rows are visible, and I change nothing, clicking Done seemingly has no effect.

In my mind, I figured that despite the fact that not all rows are being show, in the “background” there are still (potentially) some checked boxes, and thus, clicking Done would leave those selections alone (as they do when all rows are visible).