You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case, I want to allow a user to add or remove items to a column that is an array of enum[1].
Cocoon's link_to_remove does remove the item from the form, but it leaves the array item in the DOM (just hidden), so the array doesn't get properly updated on form save (if this was an association, the _destroy attribute would update it correctly, but that doesn't work for an array field)
There is also more manual stuff that I need to do in my case, since I am letting the user pick from a drop-down of values to add, which then have to be disabled/re-enabled in the dropdown when they get added or removed. To give you an idea of how I want my form to behave, here it is with my own hand-written "remove" code:
[1]: column is defined as secondary_roles public.user_role[] DEFAULT '{}'::public.user_role[] NOT NULL
The text was updated successfully, but these errors were encountered:
@nathanvda following up on #568 (comment) in a separate issue as requested.
In my case, I want to allow a user to add or remove items to a column that is an array of enum[1].
Cocoon's
link_to_remove
does remove the item from the form, but it leaves the array item in the DOM (just hidden), so the array doesn't get properly updated on form save (if this was an association, the_destroy
attribute would update it correctly, but that doesn't work for an array field)There is also more manual stuff that I need to do in my case, since I am letting the user pick from a drop-down of values to add, which then have to be disabled/re-enabled in the dropdown when they get added or removed. To give you an idea of how I want my form to behave, here it is with my own hand-written "remove" code:
[1]: column is defined as
secondary_roles public.user_role[] DEFAULT '{}'::public.user_role[] NOT NULL
The text was updated successfully, but these errors were encountered: