@libs-ui/components-table 0.2.346-5 → 0.2.346-6
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.
|
@@ -528,7 +528,7 @@ class LibsUiComponentsTableComponent {
|
|
|
528
528
|
checkExistItem(itemNew) {
|
|
529
529
|
return this.items().find((item) => `${get(item, this.fieldKey())}` === `${get(itemNew, this.fieldKey())}`) ? true : false;
|
|
530
530
|
}
|
|
531
|
-
async removeItems(keys, ignoreReCallFooter) {
|
|
531
|
+
async removeItems(keys, ignoreReCallFooter, autoCountNewItem) {
|
|
532
532
|
this.resetIndexHover();
|
|
533
533
|
if (!this.items().length) {
|
|
534
534
|
return;
|
|
@@ -550,6 +550,9 @@ class LibsUiComponentsTableComponent {
|
|
|
550
550
|
const newItems = items.filter((item) => {
|
|
551
551
|
if (`${get(item, this.fieldKey())}` === `${key}`) {
|
|
552
552
|
isUpdate = true;
|
|
553
|
+
if (autoCountNewItem) {
|
|
554
|
+
this.totalItemInBackend.update((value) => value - 1);
|
|
555
|
+
}
|
|
553
556
|
return false;
|
|
554
557
|
}
|
|
555
558
|
return true;
|