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]-[80]:Multi Tree Select not correctly populating its selectedOptionValues field. #12235

Open
1 task done
ghost opened this issue Mar 24, 2022 · 9 comments
Open
1 task done
Labels
Bug Something isn't working Cloud High This issue blocks a user from building or impacts a lot of users MultiTree Select Widget Issues related to MultiTree Select Widget Production Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets

Comments

@ghost
Copy link

ghost commented Mar 24, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Description

When accessing selected item values of a Multi Tree Select (MTS) widget and empty array is returned. The values exist under MTS.selectedOptionValueArr but not MTS.selectedOptionValues. There is an example here.

Steps To Reproduce

  1. Make a new Multi Tree Select widget
  2. Add this as the data:
[
  {
    "label": "Sovereign Team",
    "value": 1,
    "children": [
      {
        "label": "Laguna",
        "value": 4
      },
      {
        "label": "spark-c",
        "value": 9
      }
    ]
  },
  {
    "label": "OneShot Team",
    "value": 3,
    "children": [
      {
        "label": "Amelia",
        "value": 8
      }
    ]
  }
]
  1. Select any amount of values.
  2. Attempt to display or access these through MTS.selectedOptionValues

Public Sample App

https://app.appsmith.com/applications/623c8b404d9aea1b062b3047/pages/623c8b404d9aea1b062b304a

Version

Cloud

@ghost ghost added Bug Something isn't working Needs Triaging Needs attention from maintainers to triage labels Mar 24, 2022
@ghost ghost added the MultiTree Select Widget Issues related to MultiTree Select Widget label Mar 24, 2022
@github-actions github-actions bot added Widgets Product This label groups issues related to widgets UI Building Pod labels Mar 24, 2022
@dilippitchika dilippitchika added High This issue blocks a user from building or impacts a lot of users and removed Needs Triaging Needs attention from maintainers to triage labels Mar 25, 2022
@dilippitchika
Copy link
Contributor

@AS-Laguna did a user raise this?

@ghost
Copy link
Author

ghost commented Mar 25, 2022

@dilippitchika No, I found it.

@techbhavin techbhavin assigned techbhavin and unassigned Tooluloope Mar 28, 2022
@techbhavin
Copy link
Contributor

@somangshu @dilippitchika @sbalaji1192

Here I analyze tree-select children have an array of objects of label and value. both have a value type of must be a string if we put has a number (as shown in an issue) then it will be not working expected.

Screenshot 2022-03-31 at 11 50 12 AM

expected data :

[ { "label": "Sovereign Team", "value": "1", "children": [ { "label": "Laguna", "value": "4" }, { "label": "spark-c", "value": "9" } ] }, { "label": "OneShot Team", "value": "3", "children": [ { "label": "Amelia", "value": "8" } ] } ]

@dilippitchika
Copy link
Contributor

Thanks for pointing this @techbhavin, @Tooluloope @somangshu is this something we can pick up in select widget stability changes? We updated the select and multi-select to support this and we can add same functionality here as part of that epic.

@Tooluloope
Copy link
Contributor

This should be an easy fix since multiTreeSelect doesn't have serverside filtering
@techbhavin The problem here is that we stringify before we search.

We could make a derived property file. Then write a comprehensive function to recursively search the nested Options for the value?

@dilippitchika
Copy link
Contributor

@Tooluloope i believe we should add server side filtering for tree and multi tree select as well to make it consistent with the select family.

This was an issue I had created to track it - #10847

All the items in select, multi, tree and multi tree should share some common things which should be tackled as part of stability epic.

@Tooluloope
Copy link
Contributor

Nice,
Got it @dilippitchika

@dilippitchika
Copy link
Contributor

Ok so let's add this issue to - #11902

@techbhavin thanks for pointing this, we will pick this up as part of a separate epic. You don't have to pick it up now.

@dilippitchika
Copy link
Contributor

Stats

Stat Values
Reach 20
Effort (months) 0.5

@Nikhil-Nandagopal Nikhil-Nandagopal changed the title [Bug]: Multi Tree Select not correctly populating its selectedOptionValues field. [Bug]-[80]:Multi Tree Select not correctly populating its selectedOptionValues field. Apr 6, 2022
@Nikhil-Nandagopal Nikhil-Nandagopal added the Widgets & Accelerators Pod Issues related to widgets & Accelerators label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Cloud High This issue blocks a user from building or impacts a lot of users MultiTree Select Widget Issues related to MultiTree Select Widget Production Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
Development

No branches or pull requests

5 participants