fix: Modify ActionsSelector to handle global action states

Updated checkbox behavior to account for global actions.
This commit is contained in:
Classic298 2025-10-24 11:46:15 +02:00 committed by GitHub
parent 267794638c
commit 006a2d6bb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,11 +34,18 @@
<div class=" flex items-center gap-2 mr-3">
<div class="self-center flex items-center">
<Checkbox
state={_actions[action].selected ? 'checked' : 'unchecked'}
on:change={(e) => {
_actions[action].selected = e.detail === 'checked';
selectedActionIds = Object.keys(_actions).filter((t) => _actions[t].selected);
}}
state={_actions[action].is_global
? 'checked'
: _actions[action].selected
? 'checked'
: 'unchecked'}
disabled={_actions[action].is_global}
on:change={(e) => {
if (!_actions[action].is_global) {
_actions[action].selected = e.detail === 'checked';
selectedActionIds = Object.keys(_actions).filter((t) => _actions[t].selected);
}
}}
/>
</div>