@energycap/components 0.39.25-ECAP-26539-Item-Picker-Select-All.20240916-1615 → 0.39.25-ECAP-26539-Item-Picker-Select-All.20240917-0832
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.
@@ -9202,6 +9202,7 @@ class ItemPickerComponent {
|
|
9202
9202
|
});
|
9203
9203
|
this.selectedItems = Array.from(this.selectionContext.selectedItemsMap.values());
|
9204
9204
|
this.selectionContext.isSelectingAllItems = false;
|
9205
|
+
this.updateAvailableCheckboxText();
|
9205
9206
|
}
|
9206
9207
|
/**
|
9207
9208
|
* Called when the remove item button is clicked for a selected item
|
@@ -9220,6 +9221,7 @@ class ItemPickerComponent {
|
|
9220
9221
|
this.selectionContext.selectedItemsMap.delete(removeItem.id);
|
9221
9222
|
this.selectedItems = Array.from(this.selectionContext.selectedItemsMap.values());
|
9222
9223
|
}
|
9224
|
+
this.updateAvailableCheckboxText();
|
9223
9225
|
}
|
9224
9226
|
/**
|
9225
9227
|
* Click handler for the select all items button
|
@@ -9285,7 +9287,10 @@ class ItemPickerComponent {
|
|
9285
9287
|
});
|
9286
9288
|
}
|
9287
9289
|
updateAvailableCheckboxText() {
|
9288
|
-
if (
|
9290
|
+
if (this.selectionContext.isSelectingAllItems) {
|
9291
|
+
this.availableCheckboxText = this.translateService.instant('AllItemPickerItemsSelected_SC', { count: this.totalItemsBeforePaging, itemName: this.itemName });
|
9292
|
+
}
|
9293
|
+
else {
|
9289
9294
|
const checkedCount = this.selectionContext.rowCheckboxes.controls.map(c => c.value).filter(v => v).length;
|
9290
9295
|
if (checkedCount > 0) {
|
9291
9296
|
this.availableCheckboxText = this.translateService.instant('CountSelected_TC', { count: checkedCount });
|
@@ -9294,9 +9299,6 @@ class ItemPickerComponent {
|
|
9294
9299
|
this.availableCheckboxText = '';
|
9295
9300
|
}
|
9296
9301
|
}
|
9297
|
-
else {
|
9298
|
-
this.availableCheckboxText = this.translateService.instant('AllItemPickerItemsSelected_SC', { count: this.totalItemsBeforePaging, itemName: this.itemName });
|
9299
|
-
}
|
9300
9302
|
}
|
9301
9303
|
/**
|
9302
9304
|
* Watch to be told if changes to the map were made outside of the component and if so update
|