I am using Two-State Chip List with ‘Chip Highlight Mode’ set to ‘single’ so user can only select one option.
2 Databases - Users & Chocolates
User can have 1 chocolate type, but a chocolate can have many users.
User selects a chocolate and it highlights.
However on page refresh, the highlight disappears, so it doesn’t show what user has selected / the database value.
This works in other chip lists where relation is many to many and I have the ’ what does this toggle ’ option set to ‘Users logged in > current value’
User unselects a value ( so no chips are highlighted ), the user is not removed from the chocolate collection.
There is no option to remove user on toggle off
ToggleOff > Update User > LoggedInUser
ToggleOff > Update Chocolates > User
Was just about to write a similar post.
I just bought the component.
Had a one-to-many relationship and had to add a many-to-many relationship so I could put something in “What does this toggle”. The same thing happens - chips don’t stay highlighted when refreshed - and I now have the unnecessary complexity in the app of another m2m relationship.
Did you get any feedback on this?
I’ve noticed this issue for quite some time, it’s not specific to this component as you’ll see the same issue with any toggle. The way the Adalo toggle function seems to work is the active and inactive icons are fed by the condition set by “What does this toggle?” and that is only able to either toggle a Boolean (true/false) or return a Boolean of whether an array contains a specific item and add/remove appropriately (collection item > relationships (many) > includes current item?); it isn’t set up to toggle “collection item > relationship (one) > equals current item”. So you can manually add the action to update the user when you turn on and off the toggle, but that isn’t the determining factor in the UI of the button itself, so upon refreshing the screen it would reset to the off position. One workaround that might work is to go through the inverse side of the relationship, so if you are trying to go toggle logged in user > favorite chocolate = current chocolate, instead try (in the What does this toggle part) current chocolate > users (favorite chocolate) > includes current user? and it shooould both update what you’re looking to update and the toggling of the icons should work even when you leave the screen. This is what should happen, but I’m not positive cause it may just straight up be set up to only work with many to many relationships, let me know if it works for you though! If not it’s an Adalo side update to the toggling functionality that’s needed
Great answer @wbarron4 , you’re absolutely right.
It did work for me, even though it takes a little longer to filter the list.
I expected Adalo Support to be able to offer that explanation, instead of just saying I should just contact the developer (who did not reply until now), since it’s a 3rd party component.
I had some issues not only with this component, but with the Autogrow Input as well.
Thanks a lot for your help!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.