appsmith
appsmith copied to clipboard
[Bug]: Select widget should display label instead of value while editing a table cell
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
Whenever a select column type cell is editable and when user actually selects the value from drop down for the cell, then select option's value property is updated in cell's data. It is expected that select option's label property should get updated in cell data.
Steps To Reproduce
- Drag and drop a table widget and bind a query to this widget.
- Change one of it's column to select type and add select options to it.
- Make this column editable
- Now try to edit this cell
- Observe that selecting an option from the select dropdown sets the cell's data to the
valueproperty of select option instead oflabel
Public Sample App
No response
Environment
Production
Issue video log
No response
Version
Cloud
### Tasks
- [ ] https://github.com/appsmithorg/appsmith/issues/27061
- [ ] https://github.com/appsmithorg/appsmith/issues/27093
- Whenever a column is set to select, by default we show labels and not values.
- For existing tables, since we have created this problem we ensure we don't break their apps. We will give an option called "Display As" as suggested in the original issue and for new select columns, it will be Label and for existing columns, it will be Value.
- We make it clear that the computed value here refers to the default value/display value.
- We make the select widget changes we did for options in the table and json form as well, create a new issue for this.
- When the user has turned on server side filtering, we will ask the user to provide additional details for labels to be shown for cases where we cannot find them in options.
- Depending on the "display as" property, we alter the search, sort and filter behavior accordingly.
@keyurparalkar @sbalaji1192
@dilippitchika I have raised a new feature request for point 4 mentioned above.
@rishabhrathod01 you think this is realted to #30074
Please, prioritize. Wanted to use select in a table visualizing "labels" and using "values". Thank you!
Hello!
I've created a public app to demonstrate a bug observed in the "gender" column. You can access the app here: https://app.appsmith.com/app/select-in-column-bug/page1-65cee8067b1fda250a586c71?embed=true
The issue occurs when I attempt to edit a cell within this column and select a different option. Instead of displaying the labels "female" or "male", the cell shows the numerical values 1 or 2, respectively. Here's the data structure I'm using for the dropdown options:
[
{
"label": "female",
"value": 1
},
{
"label": "male",
"value": 2
}
]
I'm building an app where managers update client cities from a set list. This bug hurts a lot and makes updates with foreign key relations basically impossible.
Please, prioritize. I have the same problem as [Scrafi4] . Thank you!
I have the same problem. Please, prioritize. Thanks!
We had another customer hit this today.
I think we have a duplicate issue here: https://github.com/appsmithorg/appsmith/issues/21993
For context, see this screen shot. If I want to edit a field with a select, then I see the value (an id) as the default, but I can see the label when I'm selecting... but then once it is selected, I see the value again. This takes a very simple and powerful feature of the table, and makes it unusable.
In theory, I could parse the DB data, swap out the ids for the labels, and then try to swap them back again before saving to the DB... but this is incredibly messy. For now, it is best to use a JSON form for the editing, which severely limits the edit capabilities of the table row.
Looking forward for a fix :)
I would also like this to be worked on. I need my users to be able to select from just the label without seeing the value. Thank you.
We have hit this same issue.
Is this fixed for anyone else? I don't see that this is fixed/updated to v1.32
The table control still initially shows the value from query (the value of the select options in my case), and even after a new selection, the same thing happens and the table goes back to the value. Label is only ever used/shown once you're editing the value.