fix: select all checkbox handling
This commit is contained in:
parent
bb7e3cbe77
commit
124ab295a6
3 changed files with 41 additions and 26 deletions
|
|
@ -17,7 +17,7 @@
|
|||
type="checkbox"
|
||||
name="select_all"
|
||||
phx-click="select_all"
|
||||
checked={Enum.sort(@selected_users) == Enum.map(@users, & &1.id) |> Enum.sort()}
|
||||
checked={Enum.sort(@selected_users) == Enum.map(@users, &to_string(&1.id)) |> Enum.sort()}
|
||||
aria-label={gettext("Select all users")}
|
||||
role="checkbox"
|
||||
/>
|
||||
|
|
@ -26,10 +26,10 @@
|
|||
>
|
||||
<.input
|
||||
type="checkbox"
|
||||
name={user.id}
|
||||
name={to_string(user.id)}
|
||||
phx-click="select_user"
|
||||
phx-value-id={user.id}
|
||||
checked={user.id in @selected_users}
|
||||
phx-value-id={to_string(user.id)}
|
||||
checked={to_string(user.id) in @selected_users}
|
||||
phx-capture-click
|
||||
phx-stop-propagation
|
||||
aria-label={gettext("Select user")}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue