@masterkeymaterial/ui 0.2.30 → 0.2.31
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.
|
@@ -6922,12 +6922,19 @@ class MkGrid {
|
|
|
6922
6922
|
};
|
|
6923
6923
|
}, ...(ngDevMode ? [{ debugName: "cfg" }] : /* istanbul ignore next */ []));
|
|
6924
6924
|
startSelected = computed(() => {
|
|
6925
|
-
const
|
|
6926
|
-
if (
|
|
6927
|
-
return
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6925
|
+
const ss = this.config().startSelected;
|
|
6926
|
+
if (!ss || ss.length === 0)
|
|
6927
|
+
return null;
|
|
6928
|
+
return ss.map(s => s?.toString() ?? '');
|
|
6929
|
+
}, { ...(ngDevMode ? { debugName: "startSelected" } : /* istanbul ignore next */ {}), equal: (a, b) => {
|
|
6930
|
+
if (a === null && b === null)
|
|
6931
|
+
return true;
|
|
6932
|
+
if (a === null || b === null)
|
|
6933
|
+
return false;
|
|
6934
|
+
if (a.length !== b.length)
|
|
6935
|
+
return false;
|
|
6936
|
+
return a.every((v, i) => v === b[i]);
|
|
6937
|
+
} });
|
|
6931
6938
|
performance = computed(() => {
|
|
6932
6939
|
return this.cfg().timeRequest
|
|
6933
6940
|
? `${this.cfg().timeRequest}ms`
|
|
@@ -7010,12 +7017,18 @@ class MkGrid {
|
|
|
7010
7017
|
}, 0);
|
|
7011
7018
|
}
|
|
7012
7019
|
iniciarSelectedRows(lista) {
|
|
7013
|
-
|
|
7014
|
-
|
|
7020
|
+
const startSelected = this.startSelected();
|
|
7021
|
+
// startSelected não configurado: não interferir nas seleções existentes
|
|
7022
|
+
if (startSelected === null) {
|
|
7023
|
+
if (!lista)
|
|
7024
|
+
this.clearSelections();
|
|
7025
|
+
return;
|
|
7026
|
+
}
|
|
7027
|
+
if (!lista) {
|
|
7015
7028
|
this.clearSelections();
|
|
7016
7029
|
return;
|
|
7017
7030
|
}
|
|
7018
|
-
const startSelectedAsStrings =
|
|
7031
|
+
const startSelectedAsStrings = startSelected.map(v => v?.toString() ?? '');
|
|
7019
7032
|
let idSelecionados = lista
|
|
7020
7033
|
.map(item => LibUtil.getV(this.cfg().primarykey, item)?.toString() ?? '')
|
|
7021
7034
|
.filter(id => id != '')
|