Thanks for the explanation. I'm starting to see the value in this approach.
Instead of using 2 new options, one to pass a filter and the other to append to the selection, my suggestion would be to generalize the approach by passing an update_selection/1 function that receives the whole selection and returns the new one:
Instead of using 2 new options, one to pass a filter and the other to append to the selection, my suggestion would be to generalize the approach by passing an
update_selection/1
function that receives the whole selection and returns the new one:append case:
filter case:
2 birds with a stone. And this general approach will hopefully accommodate future use cases.
What do you think?
EDIT: this would also make sense in
single
mode_Originally posted by @maxmarcon in https://github.com/maxmarcon/live_select/issues/64#issuecomment-2156743839_