-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Bug]: Select widget should display label instead of value while editing a table cell #26188
Comments
|
@dilippitchika I have raised a new feature request for point 4 mentioned above. |
@rishabhrathod01 you think this is realted to #30074 |
Please, prioritize. |
Hello! I've created a public app to demonstrate a bug observed in the "gender" column. You can access the app here: 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. |
We had another customer hit this today. |
I think we have a duplicate issue here: #21993 |
For context, see this screen shot. If I want to edit a field with a select, then I see the 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. |
…e widget (appsmithorg#34743) ## Description **Issue** In the table widget, the select column currently displays the value from the dropdown when a user makes a selection, rather than the label. This behaviour is inconsistent with the standalone select widget, which correctly renders the label upon selection. **Fix** This PR addresses the inconsistency by modifying the table widget's select column to display the label of the selected item, ensuring alignment with the behaviour of the standalone select widget. Fixes appsmithorg#26188 ## Automation /ok-to-test tags="@tag.Table, @tag.Binding, @tag.Widget, @tag.Sanity" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/9843945454> > Commit: 330d0d3 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9843945454&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Table, @tag.Binding, @tag.Widget, @tag.Sanity` > Spec: > <hr>Mon, 08 Jul 2024 18:21:02 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Updated the `SelectCell` component to use the `option.label` instead of `option.value` for item selection. - **Tests** - Revised test descriptions and assertions for select options in Table Widget to reflect the new functionality of using labels as values in select cells. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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. |
## Description **Issue** In the table widget, the select column currently displays the value from the dropdown when a user makes a selection, rather than the label. This behaviour is inconsistent with the standalone select widget, which correctly renders the label upon selection. **Fix** This PR addresses the inconsistency by modifying the table widget's select column to display the label of the selected item, while maintaining the table cell value and ensuring alignment with the behaviour of the standalone select widget. **Tested Cases** Manual Test Cases for Table Select Widget Improvement 1. Default Value Display **Objective:** Ensure that a new table displays the correct default label key from the selectOptions in the cell. **Steps:** - Drop a new table widget. - Add sample data to the table. - Set a column (e.g., gender) to select type. - Verify that the table cell displays the value from the label key of the `selectOptions` by default. 2. Binding Check for Selected Row **Objective:** Ensure that the table binding for the selected row reflects the correct value key from the selectOptions. **Steps:** - Drop a new table widget. - Add sample data to the table. - Set a column (e.g., gender) to select type. - Select a row and verify that `Table1.selectedRow.gender` matches the value key from the `selectOptions`. 3. Updating Table Cell Content **Objective:** Verify that updating the table cell content via the dropdown updates the cell with the correct label key property. **Steps:** - Drop a new table widget. - Add sample data to the table. - Set a column (e.g., gender) to select type. - Change the content of the table cell using the dropdown. - Confirm that the cell content updates accordingly with the value key property. 4. Add New Row Functionality **Objective:** Ensure that adding a new row works as expected with the enhanced functionality. **Steps:** - Drop a new table widget. - Add sample data to the table. - Set a column (e.g., gender) to select type. - Add a new row to the table. - Verify that the new row uses the label key property from the `selectOptions` in the table display. 5. Deployed Mode Verification **Objective:** Verify that the display functionality works correctly in deployed mode. **Steps:** - Drop a new table widget. - Add sample data to the table. - Set a column (e.g., gender) to select type. - Change the displayAs property to both value and label. - Deploy the table. - Verify that the table displays correctly in both value and label modes in the deployed environment. Fixes appsmithorg#26188 ## Automation /ok-to-test tags="@tag.Table, @tag.Binding, @tag.Sanity" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10080592979> > Commit: 78b268d > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10080592979&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Table, @tag.Binding, @tag.Sanity` > Spec: > <hr>Wed, 24 Jul 2024 17:17:06 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved display of selected options in table widgets by showing the corresponding label instead of the raw value. - Introduced a feature flag to toggle the table cell label value functionality. - **Bug Fixes** - Enhanced test cases to ensure accurate validation of select options behavior within the table widget. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Is there an existing issue for this?
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
value
property of select option instead oflabel
Public Sample App
No response
Environment
Production
Issue video log
No response
Version
Cloud
Tasks
Front conversations
The text was updated successfully, but these errors were encountered: