I have a Group with a Dropdown inside. The dropdown data comes from a database querry, it is a list of things. (like “get all objects from X datatype”, I expect to have 4 or 5 objects)
I want my Group data source to be the selected value of the dropdown.
When nothing is selected from the dropdown, I expect the group to have no data because the group is expecting a unique object whereas the dropdown has several objects.
But once something is selected from the dropdown, I expect the Group to get that object.
It does not work and is very buggy, it seems that the Group never really get the infos.
Can someone point me out where I am wrong?
Hi there, @bonjour_17… if I understand your post correctly, you could create a custom state that is the same type as the things in the dropdown. Then, set the group’s data source to the custom state. Finally, when the dropdown’s value is changed, set the custom state to the selected thing, and you should be good to go.
Hope this helps.
Thanks for the solution, it works indeed. I just implemented it for testing.
I still have 2 remarks :
1- I see that the dropdown do not visually keep its value. As soon as I choose one option, the dropdown displays a blank space as it’s default state. Why is that ? (link to the app : Bubble | No-code apps)
2- In addition, for my understanding, do you have any idea why my initial logic do not work? Why can’t we point directly the Group data source to be a sub-element Dropdown’s value?
It would make things easier with 1 less custom state and 1 less workflow.
All the best
For #1, set the dropdown’s default value to the custom state, too.
About #2, I have never tried that before, but I wouldn’t have expected it to work because the dropdown is in the group. If the dropdown is outside of the group, it works. I can’t explain exactly why, but again, I wouldn’t have expected it to work that way.
This topic was automatically closed after 70 days. New replies are no longer allowed.