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]: Select widget should display label instead of value while editing a table cell #26188

Closed
1 of 2 tasks
keyurparalkar opened this issue Aug 9, 2023 · 12 comments · Fixed by #34743
Closed
1 of 2 tasks
Assignees
Labels
App Viewers Pod This label assigns issues to the app viewers pod Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Production QA Pod Issues under the QA Pod QA Needs QA attention Table Widget Widgets & Blocks Pod Issues under widgets and blocks pod.

Comments

@keyurparalkar
Copy link
Contributor

keyurparalkar commented Aug 9, 2023

Is there an existing issue for this?

  • 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

  1. Drag and drop a table widget and bind a query to this widget.
  2. Change one of it's column to select type and add select options to it.
  3. Make this column editable
  4. Now try to edit this cell
  5. Observe that selecting an option from the select dropdown sets the cell's data to the value property of select option instead of label

Public Sample App

No response

Environment

Production

Issue video log

No response

Version

Cloud

Tasks

  1. Task
    keyurparalkar
  2. App Viewers Pod Documentation Needs More Info Table Widget Task User Education Pod
    keyurparalkar

Front logo Front conversations

@keyurparalkar keyurparalkar added Bug Something isn't working Table Widget High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage labels Aug 9, 2023
@keyurparalkar keyurparalkar self-assigned this Aug 9, 2023
@github-actions github-actions bot added the App Viewers Pod This label assigns issues to the app viewers pod label Aug 9, 2023
@dilippitchika
Copy link
Contributor

  1. Whenever a column is set to select, by default we show labels and not values.
  2. 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.
  3. We make it clear that the computed value here refers to the default value/display value.
  4. We make the select widget changes we did for options in the table and json form as well, create a new issue for this.
  5. 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.
  6. Depending on the "display as" property, we alter the search, sort and filter behavior accordingly.

@keyurparalkar @sbalaji1192

@keyurparalkar
Copy link
Contributor Author

@dilippitchika I have raised a new feature request for point 4 mentioned above.

@somangshu
Copy link
Contributor

@rishabhrathod01 you think this is realted to #30074

@Nikhil-Nandagopal Nikhil-Nandagopal changed the title [Bug]: Value property of select option is set for a cell while editing table data [Bug]: Select widget should display label instead of value while editing a table cell Feb 2, 2024
@MAL0780
Copy link

MAL0780 commented Feb 7, 2024

Please, prioritize.
Wanted to use select in a table visualizing "labels" and using "values".
Thank you!

@Scrafi4
Copy link

Scrafi4 commented Feb 16, 2024

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.
изображение
изображение

@AndreeaIAM
Copy link

Please, prioritize.
I have the same problem as [Scrafi4] .
Thank you!

@somangshu somangshu removed the Needs Triaging Needs attention from maintainers to triage label Mar 12, 2024
@neilhanhan
Copy link

I have the same problem.
Please, prioritize.
Thanks!

@rlnorthcutt
Copy link

We had another customer hit this today.

@rlnorthcutt
Copy link

I think we have a duplicate issue here: #21993

@rlnorthcutt
Copy link

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.

image

@bastien-naturavelo
Copy link

Looking forward for a fix :)

@awalters141
Copy link

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.

@jacquesikot jacquesikot self-assigned this Jul 4, 2024
@appsmith-bot appsmith-bot added the QA Needs QA attention label Jul 9, 2024
@github-actions github-actions bot added the QA Pod Issues under the QA Pod label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Viewers Pod This label assigns issues to the app viewers pod Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Production QA Pod Issues under the QA Pod QA Needs QA attention Table Widget Widgets & Blocks Pod Issues under widgets and blocks pod.
Projects
None yet