When I use Set Selection with operation type “Toggle Selection” on a runtime collection the selection seems to be unaffected. The same objects are still selected after the action is executed. I was expecting the selection to be inverted. I assume this is a bug.
Hi @lbj, thank you for reporting! I was able to reproduce it both on runtime and database-connected data sources and it does seem like a bug. I’ll register a challenge.
Hi Joanna,
Do you have any updates on this? I’m experiencing the same issue—the toggle selection action node doesn’t seem to have any effect at all.
Hi!
I see that the challenge that was registered was rejected. It seems like the behaviour was as expected.
Can you elaborate on what you’re trying to do and how you expect Toggle Selection to behave?
I’m trying to recreate table row selection with a custom icon and an action that selects and unselects(toggle) the object in context in a runtime datasouce. The action seems to work with selection but not the other way. It could be that I misunderstood the action logic, as I’m quite new in Appfarm.
Using toggle selection should select the object in context if it is not selected, and unselect the object in context if it is selected.
That is also how it behaves when I test it.
Could you provide some screenshots of your implementation either here or by DM?
@Olav It’s a pretty old post but, if I remember correctly, back when we discussed it with @lbj the grayed-out part of the Set Selection
action node was not there, making us both assume that Toggle Selection
with a selected data source should invert selection on all objects in the data source.
I suppose the intended behaviour is clearer now, but it still would be useful in some scenarios to have the possibility of choosing the selection type.