Skip to content

Commit 80c7bcd

Browse files
committed
style: fix comments & type
1 parent a75537d commit 80c7bcd

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

packages/pluggableWidgets/datagrid-web/src/model/services/MainGateProvider.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ export class MainGateProvider<T> extends GateProvider<T> {
1111
this.exportProgress = new ProgressService();
1212
}
1313

14+
/**
15+
* @remark
16+
* To avoid unwanted UI rerenders, we block prop updates during the "select all" action or export.
17+
*/
1418
setProps(props: T): void {
1519
if (this.exportProgress.inProgress) return;
1620
if (this.selectAllProgress.inProgress) return;

packages/pluggableWidgets/datagrid-web/typings/MainGateProps.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export type MainGateProps = Pick<
1010
| "configurationAttribute"
1111
| "configurationStorageType"
1212
| "datasource"
13-
| "datasource"
1413
| "emptyPlaceholder"
1514
| "enableSelectAll"
1615
| "itemSelection"

packages/shared/widget-plugin-grid/src/select-all/SelectAll.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ export class SelectAllService {
118118
console.error(error);
119119
}
120120
} finally {
121-
// Restore init view
122-
// This step should be done before loadend to avoid UI flickering
121+
// Restore init view. This step should be done before loadend to avoid UI flickering.
123122
await this.query.fetchPage({
124123
limit: initLimit,
125124
offset: initOffset
126125
});
126+
// Reload selection to make sure setSelection is working as expected.
127127
await this.reloadSelection();
128+
128129
this.progress.emit("loadend");
129-
// Reload selection to make sure setSelection is working as expected.
130130
this.selection?.setSelection(success ? allItems : initSelection);
131131
this.locked = false;
132132
this.abortController = undefined;

0 commit comments

Comments
 (0)