lookup distinct values

This commit is contained in:
Jan Prochazka
2021-11-20 11:36:53 +01:00
parent 4f8844d989
commit 6f7452ab6d
4 changed files with 234 additions and 6 deletions

View File

@@ -179,8 +179,11 @@
checked={checkedKeys.includes(row[tableInfo.primaryKey.columns[0].columnName])}
on:change={e => {
const value = row[tableInfo.primaryKey.columns[0].columnName];
if (e.target.checked) checkedKeys = [...checkedKeys, value];
else checkedKeys = checkedKeys.filter(x => x != value);
if (e.target.checked) {
if (!checkedKeys.includes(value)) checkedKeys = [...checkedKeys, value];
} else {
if (checkedKeys.includes(value)) checkedKeys = checkedKeys.filter(x => x != value);
}
e.stopPropagation();
}}
/>