Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: select column to display cell value when options are mismatched (#…
…38387) ## Description **Problem** When a table cell is configured with the Select column type, the cell value is not displayed if it does not match any of the label-value pairs in the select options. This results in a broken user experience where it appears as if the cell has no value. **Expected Behaviour** The table cell should always display its value if it exists, regardless of whether it matches the provided select options. **Solution** To address this issue, the default behaviour for the select options has been updated to prioritise the cell's value instead of falling back to an empty string. This ensures that cell values are always visible to the user, even if they are not part of the predefined select options. Fixes #35807 ## Automation /ok-to-test tags="@tag.Widget, @tag.Select, @tag.Binding, @tag.Table, @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/12544985047> > Commit: d39d7f3 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12544985047&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Widget, @tag.Select, @tag.Binding, @tag.Table, @tag.Sanity` > Spec: > <hr>Mon, 30 Dec 2024 11:52:44 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 - **Bug Fixes** - Improved display logic in the SelectCell component to show the value when no matching option is found. - Updated test cases for the Select column type functionality to ensure accurate verification of select options and display behavior when options are not provided. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information