From my comment on #64
An unexpected API gotcha that would require a breaking change to fix:
Superform select expects [value, label] ordering for select options, which is the opposite of Rails' options_for_select [label, value].
This is a real gotcha for refactoring from ERB, it means devs have to manually flip all the arrays.
It would be good to change this API. I can't imagine how to change it without breaking people's existing select implementations, though.
I keep encountering this in my Phlex conversions, and I hope creating an issue here might be a good way to discuss workarounds, or a fix.
From my comment on #64
An unexpected API gotcha that would require a breaking change to fix:
Superform
selectexpects[value, label]ordering for select options, which is the opposite of Rails'options_for_select[label, value].This is a real gotcha for refactoring from ERB, it means devs have to manually flip all the arrays.
It would be good to change this API. I can't imagine how to change it without breaking people's existing select implementations, though.
I keep encountering this in my Phlex conversions, and I hope creating an issue here might be a good way to discuss workarounds, or a fix.