Changing default selection of column type "selection" modifies all empty fields im column
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 214
- Forks
- 52
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 82
Description
Steps to reproduce
- Create a column with type "selection" and do not make it obligatory
- Create some entries in table and do not choose any entry of the selection (because it's not obligatory).
- Afterwards modify the column and make one of the entries to the default.
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 🙂 .
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior in the Tables app using the reported steps: create an optional selection column, leave values empty, then set a default. Trace how empty selection values are handled when the column definition changes. Done means existing empty rows remain empty while the new default applies only where intended, and the first selection entry remains selectable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100