Reputation: 449
I have a dropdown column in my gallery which is connected to a SharePoint list. My SharePoint list has around 200 items. If I select something from the dropdown in the first two rows and then scroll down to the bottom and select values for those rows, the dropdowns for all rows remain. But if I use my search box to look up for names and select their dropdown values then the dropdown values for all the other rows reset. How do I stop this from happening?
I have tried Set(MySelection, Dropdown1.Selected.Value)
for the OnSelect propety and using MySelction
variable in default but this does not work. Do I need to make some changes in my filter function?
Upvotes: 0
Views: 4238
Reputation: 155
Consider it this way, you changing your dropdown doesn't save it's value anywhere and when the gallery is filtered, it sort of refreshes itself and your dropdown data is lost. What you can do is create a collection using onchange event and add your dropdown responses in that collection along with the ID of the item which is unique considering it's coming from SharePoint. You can use the same collection to set the default property of the dropdown at the same time. And at the end, if you want to patch your sharepoint with all the changes, you can use the collection and patch everything at once.
Upvotes: 0
Reputation: 11
Try Set(MySelection, Dropdown1.Selected.Value) in both onSelect and onChange property and use that variable in default property. It'll work perfectly fine.
Upvotes: 1