Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure Select Column Displays Data When Options Are Not Set (#35817
) ## Description **Problem** When using a table widget, changing a column to the "Select" type causes the data in that column to disappear unless the options property is explicitly set. This creates a poor user experience, as it appears that the data has been lost or the widget is malfunctioning. **Solution** We have implemented a fallback mechanism to ensure a smoother user experience. If no options are set in the property pane, the label inside the select cell will now default to displaying the existing value. This ensures that the data remains visible, even in the absence of predefined 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/10513374411> > Commit: 1e89468 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10513374411&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Widget, @tag.Select, @tag.Binding, @tag.Table, @tag.Sanity` > Spec: > <hr>Thu, 22 Aug 2024 19:43:53 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** - Enhanced the select column in the table widget to return a default value when no options are available. - **Bug Fixes** - Improved robustness of the select cell component to prevent errors when the options array is empty. - **Tests** - Updated and reorganized test cases for the select column to improve clarity and specificity. - Introduced a new test case to validate default value behavior when no options are provided. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information