@plcmp/pl-selectlist-manager
v1.0.0
Published
Syncs row._selected on flat data from selected and marked id lists.
Readme
@plcmp/pl-selectlist-manager
Writes row._selected (true | null | false) on a flat data array from id lists. Use with pl-table / pl-combobox in external-select mode.
Installation
npm i @plcmp/pl-selectlist-managerUsage
<pl-selectlist-manager
data="{{rows}}"
key-property="id"
selected-id="{{selectedId}}"
marked-id="{{markedId}}"
></pl-selectlist-manager>
<pl-table
multi-select
external-select
data="{{rows}}"
selected-list="{{selectedList}}"
></pl-table>API
| Property | Description |
|----------|-------------|
| data | Row array (two-way); _selected is updated in place |
| keyProperty | Row id field (default id) |
| selectedId | Fully selected ids → _selected: true |
| markedId | Partial parent ids → _selected: null |
| selectListId | Alternate fully selected ids → _selected: true |
Marked/partial logic is owned by the host (form); the manager only applies ids to _selected.
