appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.17k stars 3.7k forks source link

[Enhancement]: Enable setters for items in a List Widget #30810

Open tmedford-zuora opened 8 months ago

tmedford-zuora commented 8 months ago

Is there an existing issue for this?

Description

I have a list with an input in each row, I want to set it for the N items in the list programmatically.

Steps To Reproduce

MultiSelect = multi-select option XXXXX = list with the multi select inside it.

I can call on in the original first row MultiSelect.setSelectedOptions("");

I can find all the selected items in the list via List.currentItemsView.map((view) => { return view.MultiSelect.selectedOptionValues}))

but I cannot access the original setter "setSelectedOptions" for each item. XXXXX.currentItemsView.map((view) => { return view.MultiSelect.setSelectedOptions(""}))

I suspect the setters were not exposed after being used in a list.

Public Sample App

No response

Environment

Production

Issue video log

https://github.com/appsmithorg/appsmith/assets/140523728/901d9109-600e-4468-9d3e-ca743d555552

Version

Cloud

Nikhil-Nandagopal commented 8 months ago

@tmedford-zuora thanks for reporting this. We had not intended to enable this so we'll treat this as an enhancement

tmedford-zuora commented 8 months ago

@Nikhil-Nandagopal How hard of an enhancement is this? If you can point to the location, we may be able to make enhancements ourselves.

Nikhil-Nandagopal commented 8 months ago

@tmedford-zuora This is a fairly complex change in the list widget. You can still update the values of widgets in the list by simply modifying the data sent to the items field. Typically you can store it using storeValue and update it. Let us know if you are having trouble achieving something in your application.