I have a "Bulk actions" menu that should enable once the user checks some table rows, but it stays disabled forever (toggling the other direction doesn't apply either).
<.menu disabled={...}> renders correctly, but changing it later from the server does nothing.
Seems to be because the trigger's disabled-related attrs (disabled, aria-disabled, data-disabled, tabindex) are all in the trigger's ignored attrs, and nothing on the client re-reads them — so a LiveView patch that changes disabled is silently dropped.
I'm currently working around it by rendering a plain disabled when disabled and swapping in the real menu when it flips. Works fine, but the documented disabled attr feels like it should keep working after mount.
I have a "Bulk actions" menu that should enable once the user checks some table rows, but it stays disabled forever (toggling the other direction doesn't apply either).
<.menu disabled={...}>renders correctly, but changing it later from the server does nothing.Seems to be because the trigger's disabled-related attrs (
disabled,aria-disabled,data-disabled,tabindex) are all in the trigger's ignored attrs, and nothing on the client re-reads them — so a LiveView patch that changesdisabledis silently dropped.I'm currently working around it by rendering a plain disabled when disabled and swapping in the real menu when it flips. Works fine, but the documented
disabledattr feels like it should keep working after mount.