@esfaenza/es-table 11.2.102 → 11.2.104
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.
- package/bundles/esfaenza-es-table.umd.js +20 -3
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +1 -1
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esfaenza-es-table.metadata.json +1 -1
- package/esm2015/lib/components/es-table/es_table.component.js +18 -4
- package/fesm2015/esfaenza-es-table.js +17 -3
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +7 -3
- package/package.json +1 -1
|
@@ -3554,6 +3554,8 @@ class EsTableComponent {
|
|
|
3554
3554
|
this.Editable = false;
|
|
3555
3555
|
/** Indica se è possibile effettuare selezioni a range per poi farci eventualmente copia incolla */
|
|
3556
3556
|
this.RangeSelection = false;
|
|
3557
|
+
/** Indica il numero di millisecondi per cui debouncare il writeValue per la modalità **EsTableHandledSearch** */
|
|
3558
|
+
this.SearchThrottle = 50;
|
|
3557
3559
|
/** Evento che viene richiamato al cambio di oridnamento di una colonna */
|
|
3558
3560
|
this.onOrderChanged = new EventEmitter();
|
|
3559
3561
|
/**
|
|
@@ -3626,6 +3628,8 @@ class EsTableComponent {
|
|
|
3626
3628
|
this.DirectivesBased = false;
|
|
3627
3629
|
/** Indica lo stato di selezione per singola cella */
|
|
3628
3630
|
this.selectionStatus = {};
|
|
3631
|
+
/** Chiamata reale al writeValue dopo il passaggio di **SearchThrottle** millisecondi. Solo modalità EsTableHandledSearch */
|
|
3632
|
+
this.callTimeout = null;
|
|
3629
3633
|
/** Opzioni di paginazione */
|
|
3630
3634
|
this.PagerOptions = { PagerCount: null, ShowCount: true, ShowPaging: true, ShowButtons: true, ShowPagingOptions: true, UsesView: true, View: null, Ready: false, Searches: 'items' };
|
|
3631
3635
|
/** @ignore */
|
|
@@ -3735,12 +3739,21 @@ class EsTableComponent {
|
|
|
3735
3739
|
/** @ignore */
|
|
3736
3740
|
registerOnTouched(fn) { }
|
|
3737
3741
|
/** @ignore */
|
|
3738
|
-
changed(
|
|
3742
|
+
changed(clearItems = false) {
|
|
3743
|
+
if (clearItems && this.viewMode)
|
|
3744
|
+
this.View.items = [];
|
|
3745
|
+
this.propagateChange(this.View);
|
|
3746
|
+
}
|
|
3739
3747
|
/** @ignore */
|
|
3740
|
-
writeValue(obj) {
|
|
3748
|
+
writeValue(obj, throttle = true) {
|
|
3741
3749
|
var _a;
|
|
3742
3750
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3743
3751
|
this.View = obj ? obj : null;
|
|
3752
|
+
if (this.EsTableHandledSearch && throttle) {
|
|
3753
|
+
if (this.callTimeout)
|
|
3754
|
+
clearTimeout(this.callTimeout);
|
|
3755
|
+
this.callTimeout = setTimeout(() => { this.writeValue(obj, false); }, this.SearchThrottle);
|
|
3756
|
+
}
|
|
3744
3757
|
// Mi è arrivata l'AppSearch quindi di sicuro non ho una ricerca in progress
|
|
3745
3758
|
this.researchInProgress = false;
|
|
3746
3759
|
if (!this.View && !this.SearchView) {
|
|
@@ -3863,7 +3876,7 @@ class EsTableComponent {
|
|
|
3863
3876
|
this.postBoundSourceCalculation();
|
|
3864
3877
|
if (this.View && !this.View.selfsearch && this.EsTableHandledSearch) {
|
|
3865
3878
|
this.View.selfsearch = true;
|
|
3866
|
-
this.changed();
|
|
3879
|
+
this.changed(true);
|
|
3867
3880
|
this.onSearchRequest.emit(false);
|
|
3868
3881
|
}
|
|
3869
3882
|
else if (this.View && this.View.selfsearch && this.EsTableHandledSearch) {
|
|
@@ -4831,6 +4844,7 @@ EsTableComponent.propDecorators = {
|
|
|
4831
4844
|
ShowItemGroupsColumns: [{ type: Input }],
|
|
4832
4845
|
Editable: [{ type: Input }],
|
|
4833
4846
|
RangeSelection: [{ type: Input }],
|
|
4847
|
+
SearchThrottle: [{ type: Input }],
|
|
4834
4848
|
onOrderChanged: [{ type: Output }],
|
|
4835
4849
|
onSearchRequest: [{ type: Output }],
|
|
4836
4850
|
onSelectionChanged: [{ type: Output }],
|