@servicemind.tis/tis-smart-table-viewer 2.3.9 → 2.3.10
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.
|
@@ -2105,12 +2105,12 @@ class TisSmartTableViewerComponent {
|
|
|
2105
2105
|
if (this.dataLengthSubscription) {
|
|
2106
2106
|
this.dataLengthSubscription.unsubscribe();
|
|
2107
2107
|
}
|
|
2108
|
-
// ✅ FIX:
|
|
2109
|
-
|
|
2110
|
-
|
|
2108
|
+
// ✅ FIX: Only create datasource once on initialization
|
|
2109
|
+
// Reusing the same datasource prevents subscription issues
|
|
2110
|
+
if (!this.dataSource) {
|
|
2111
|
+
this.dataSource = new ApiDataSource(this.apiService);
|
|
2112
|
+
// Template binding [dataSource]="dataSource" will handle the connection
|
|
2111
2113
|
}
|
|
2112
|
-
// Create new ApiDataSource
|
|
2113
|
-
this.dataSource = new ApiDataSource(this.apiService);
|
|
2114
2114
|
this.loadingSubscription = this.dataSource.loading$.subscribe(loading => {
|
|
2115
2115
|
if (!loading) {
|
|
2116
2116
|
if (this._paginator) {
|