-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing default selection of column type "selection" modifies all empty fields im column #1473
Comments
Thanks for reaching out @MI-KY!
Actually, Imo, what happens is what is expected. The mandatory value will receive the default value. An empty set is not a valid choice after changing the configuration like described. An alternative scenario would be to rigidly block this operation, because there are empty values (not so UI friendly) or point out the fact that there are and they will be turned to default values. This could a message and the column edit modal as well, when ticking mandatory.
At least elaborating on it would be helpful :) |
Thanks for your answer!
I agree with you when talking of fields that get mandatory afterwards but as far as I remember this was not the case: I had a field that was not mandatory but got a default value after inserting some data. In such a situation I wouldn't expect this behaviour...
For the other problem I will try to make a more detailed description and open a new issue :+1
|
Woah, my bad, somehow i interpreted it as in editing the column to make it mandatory. Nevertheless, I still would argue, if you have no default before, but then change the column to have a default, it is expectable for non-chosen values to resort to the default. That's the purpose of the default value. |
It's clearly depending on the point of view, but I would like to describe it from my perspective:
A user could have situations were a empty field is perfectly ok because the field isn't mandatory. By filling in a lot of data into the table at some point the user sees that when inseting data it's likely that the field will contain more often one value and therefore he sets this value as default. IMO setting a default value wouldn't necessarily have to change all the empty entries to the new default. Think of a user (or company) that has filled in multiple rows in the table where the field has been left empty. It would be critical to change these fields automatically to the new default value because somehow this seams to "manipulate" the content of the table without the user knowing it...
Next problem in this scenario: When you afterwards change the value to an other default all the fields that were empty before would change again to the new default. Somehow I'm asking myself what would happen if the data is exported: there the fields would be empty i think?
Personally I wouldn't think that this is how a user would expect Tables to work.
From an admin perspective I would expect that the dialog to configure the field (where you set it mandatory and insert new values for the selection etc.) would only change how the "field" is shown in the UI and not the data in the column behind it.
|
Steps to reproduce
Expected behavior
Nothing should change in the table because the column when not obligatory should also deal with empty values.
Actual behavior
All rows in the table that have no value in the column get automatically set the default value of the column.
Tables app version
0.8.1
Browser
Firefox 131.0.3
Client operating system
Linux
Operating system
No response
Web server
Apache
PHP engine version
None
Database
MariaDB
Additional info
In fact the column type "selection" should also deal with empty values - it seams like there are multiple problems that maybe arise with the fact that "empty" somewhere in the code is the first entry in the list (but not everywhere): you can't choose the first entry in the list as default because in this situation the form to insert new entries always shows an empty field for the selection.
I can open an other issue for this error if needed 🙂 .
The text was updated successfully, but these errors were encountered: