@masterkeymaterial/ui 0.2.16 → 0.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6892,12 +6892,6 @@ class MkGrid {
|
|
|
6892
6892
|
this.numOrdemPrimeiroExibido.set(numeroPrimeiro);
|
|
6893
6893
|
this.numOrdemUltimoExibido.set(numeroUltimo);
|
|
6894
6894
|
});
|
|
6895
|
-
effect(() => {
|
|
6896
|
-
const isSelected = this.config().isSelected();
|
|
6897
|
-
if (isSelected === false) {
|
|
6898
|
-
this.clearSelections();
|
|
6899
|
-
}
|
|
6900
|
-
});
|
|
6901
6895
|
}
|
|
6902
6896
|
ngOnInit() {
|
|
6903
6897
|
this.filtroCollapsed.set(this.config().filterBarStartCollapsed ?? true);
|
|
@@ -7335,7 +7329,7 @@ class MkGrid {
|
|
|
7335
7329
|
}
|
|
7336
7330
|
else {
|
|
7337
7331
|
for (const linha of listaOrdenada) {
|
|
7338
|
-
await this.
|
|
7332
|
+
await this.selecionarLinha(linha.id, linha.dados);
|
|
7339
7333
|
}
|
|
7340
7334
|
}
|
|
7341
7335
|
await LibUtil.wait(100);
|
|
@@ -7347,32 +7341,38 @@ class MkGrid {
|
|
|
7347
7341
|
if (!linha.dados)
|
|
7348
7342
|
return;
|
|
7349
7343
|
if (this.selectedRows().includes(linha.id)) {
|
|
7350
|
-
this.desselecionarLinha(linha.id, linha.dados);
|
|
7344
|
+
await this.desselecionarLinha(linha.id, linha.dados);
|
|
7351
7345
|
}
|
|
7352
7346
|
else {
|
|
7353
|
-
this.
|
|
7347
|
+
await this.selecionarLinha(linha.id, linha.dados);
|
|
7354
7348
|
}
|
|
7355
7349
|
}
|
|
7356
7350
|
clearSelections() {
|
|
7357
7351
|
this.selectedRows.set([]);
|
|
7358
7352
|
}
|
|
7359
|
-
async
|
|
7353
|
+
async selecionarLinha(id, dados) {
|
|
7360
7354
|
if (this.selectedRows().includes(id))
|
|
7361
7355
|
return;
|
|
7362
7356
|
if (this.config().selectionMode == 'single') {
|
|
7363
|
-
this.
|
|
7357
|
+
this.selectedRows.set([id]);
|
|
7358
|
+
}
|
|
7359
|
+
else {
|
|
7360
|
+
this.selectedRows.set([...this.selectedRows(), id]);
|
|
7364
7361
|
}
|
|
7365
|
-
this.
|
|
7366
|
-
this.config().
|
|
7367
|
-
this.config().onSelectionChanged?.(dados, this.selectedRows());
|
|
7368
|
-
this.config().isSelected.set(true);
|
|
7362
|
+
await this.config().onSelected?.(dados, this.selectedRows());
|
|
7363
|
+
await this.config().onSelectionChanged?.(dados, this.selectedRows());
|
|
7369
7364
|
}
|
|
7370
7365
|
async desselecionarLinha(id, dados) {
|
|
7371
7366
|
if (!this.selectedRows().includes(id))
|
|
7372
7367
|
return;
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7368
|
+
if (this.config().selectionMode == 'single') {
|
|
7369
|
+
this.selectedRows.set([]);
|
|
7370
|
+
}
|
|
7371
|
+
else {
|
|
7372
|
+
this.selectedRows.set(this.selectedRows().filter(i => i !== id));
|
|
7373
|
+
}
|
|
7374
|
+
await this.config().onUnselected?.(dados, this.selectedRows());
|
|
7375
|
+
await this.config().onSelectionChanged?.(dados, this.selectedRows());
|
|
7376
7376
|
}
|
|
7377
7377
|
onClickGroup(dadosDaLinha) {
|
|
7378
7378
|
this.gruposColapsed.update(g => {
|