Skip to content
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]: Data in a column of a table is coming up as empty, though data exists in the column #35807

Open
1 task done
btsgh opened this issue Aug 21, 2024 · 8 comments · Fixed by #35817 · May be fixed by #38387
Open
1 task done

[Bug]: Data in a column of a table is coming up as empty, though data exists in the column #35807

btsgh opened this issue Aug 21, 2024 · 8 comments · Fixed by #35817 · May be fixed by #38387
Assignees
Labels
Bug Something isn't working Critical This issue needs immediate attention. Drop everything else High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage Production QA Pod Issues under the QA Pod QA Needs QA attention Regressed Scenarios that were working before but have now regressed Table Widget Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets

Comments

@btsgh
Copy link
Collaborator

btsgh commented Aug 21, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description

In an existing application, [Regression app as well as Entry Criteria app on internal], the data in particular column/s in a table is coming up as empty

Steps To Reproduce

  1. Go to the Entry Criteria app
  2. Choose an existing feature from the dropdown and go to the Feature Impact tab.
  3. Note that the Impact column is showing up empty, though there is data in the column
  4. Try also with the Regression app tagging calendar
  5. Note that the Tagging column is empty, though there is data in that column

Public Sample App

No response

Environment

Production

Severity

High (Blocker to building or releasing)

Issue video log

https://jam.dev/c/1720babd-5bff-4bf0-b406-c3fd9a6e80b2

Version

Cloud

@btsgh btsgh added Bug Something isn't working Table Widget Critical This issue needs immediate attention. Drop everything else Production Regressed Scenarios that were working before but have now regressed Needs Triaging Needs attention from maintainers to triage labels Aug 21, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added the High This issue blocks a user from building or impacts a lot of users label Aug 21, 2024
@github-actions github-actions bot added Widgets Product This label groups issues related to widgets Widgets & Accelerators Pod Issues related to widgets & Accelerators labels Aug 21, 2024
jacquesikot added a commit that referenced this issue Aug 23, 2024
)

## 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 -->
@appsmith-bot appsmith-bot added the QA Needs QA attention label Aug 23, 2024
@github-actions github-actions bot added the QA Pod Issues under the QA Pod label Aug 23, 2024
@LagunaElectric
Copy link

@jacquesikot Another user is still seeing this issue in 1.51. When they type filter text in their select column it re-runs the query with the filter, and the rest of the columns are blank. Is this the same issue or should we file a new one? Asking because of the associated PR.

Relevant Front Thread

@dpro-shc
Copy link

I'm the other user. The issue occurs when the query for the options, triggered on the filtertext, resolves. When it does, all the other data in the same column appear empty. This persists even when an option is selected or a new row is added. It seems like the only trick to get the existing values to appear is when clearing the filter text.

This seriously impacts my users and effectively renders the entire application useless.

@jacquesikot
Copy link
Contributor

@dpro-shc thanks for your comment, please can you send a video clearly explaining the steps you took to achieve this behaviour? I am unable to reproduce clearly.

@dpro-shc
Copy link

dpro-shc commented Dec 19, 2024

I can't send a video, but I could list the steps and give you more detail:

  1. Create a big table of options in the db,
  2. Create a table with a column containing values from the previous table
  3. Create a query to get data from step 2
  4. Create a table widget, binding to .data of query from 3
  5. Change column type in the table widget to select and make it editable
  6. Create a query to filter the rows from the table in step 1, binding to TableWidget.selectColumnFilterText.column_name for the filter/similarity search like this: {{TableWidget.selectColumnFilterText.column_name?TableWidget.selectColumnFilterText.column_name:""}} and returning data with the shape like {label: dbtable1.rowvalue, value: dbtable1.rowvalue}
  7. Bind the select column options to the filter query from step 6's data
  8. Turn on server-side filtering, with both onFilterText and onOptionChange calling .run() of the filter query from step 6.
  9. Edit the data in the table widget from step 4

@jacquesikot
Copy link
Contributor

jacquesikot commented Dec 26, 2024

Thanks @dpro-shc I am able to replicate your issue and will work on a solution.

@jacquesikot
Copy link
Contributor

@dpro-shc can you please try your app in this preview version. I have a fix - https://ce-38387.dp.appsmith.com let me know if it works for you. Thanks

@dpro-shc
Copy link

How could I test? My appsmith instance is running on a docker container. I read your pull request, the empty string being the default when there are no values aligns with the behavior that started this conversation

@dpro-shc
Copy link

Is it possible to roll this out? This is a blocker on my roadmap and I need ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Critical This issue needs immediate attention. Drop everything else High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage Production QA Pod Issues under the QA Pod QA Needs QA attention Regressed Scenarios that were working before but have now regressed Table Widget Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
7 participants