@ai-table/grid 0.5.5 → 0.5.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.
- package/fesm2022/ai-table-grid.mjs +9 -0
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8838,6 +8838,15 @@ class AITableScrollableGroup {
|
|
|
8838
8838
|
const scrollY = this.scrollY();
|
|
8839
8839
|
this.scrollPosition.emit({ scrollX, scrollY });
|
|
8840
8840
|
});
|
|
8841
|
+
// 监听bgName变化,当cell切换时重置滚动位置
|
|
8842
|
+
effect(() => {
|
|
8843
|
+
const currentBgName = this.config().bgName;
|
|
8844
|
+
if (this.previousBgName !== undefined && this.previousBgName !== currentBgName) {
|
|
8845
|
+
this.scrollX.set(0);
|
|
8846
|
+
this.scrollY.set(0);
|
|
8847
|
+
}
|
|
8848
|
+
this.previousBgName = currentBgName;
|
|
8849
|
+
});
|
|
8841
8850
|
}
|
|
8842
8851
|
ngAfterViewInit() {
|
|
8843
8852
|
this.contentTemplate().getNode().moveTo(this.contentGroup.getNode());
|