@ai-table/grid 0.5.3 → 0.5.4
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 +14 -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
|
@@ -12650,6 +12650,7 @@ class RecordDetailComponent {
|
|
|
12650
12650
|
this.activeFieldId = null;
|
|
12651
12651
|
this.fieldMenuActive = signal({}, ...(ngDevMode ? [{ debugName: "fieldMenuActive" }] : []));
|
|
12652
12652
|
this.fieldMenuPopoverRef = null;
|
|
12653
|
+
this.currentPopoverFieldId = null;
|
|
12653
12654
|
this.slideRef = inject(ThySlideRef);
|
|
12654
12655
|
this.thyPopover = inject(ThyPopover);
|
|
12655
12656
|
effect(() => {
|
|
@@ -12665,6 +12666,17 @@ class RecordDetailComponent {
|
|
|
12665
12666
|
this.internalRecordId.set(activeCell[0]);
|
|
12666
12667
|
}
|
|
12667
12668
|
});
|
|
12669
|
+
effect(() => {
|
|
12670
|
+
const fields = this.fields();
|
|
12671
|
+
if (this.currentPopoverFieldId && this.fieldMenuPopoverRef) {
|
|
12672
|
+
const fieldExists = fields.some((field) => field._id === this.currentPopoverFieldId);
|
|
12673
|
+
if (!fieldExists) {
|
|
12674
|
+
this.fieldMenuPopoverRef.close();
|
|
12675
|
+
this.fieldMenuPopoverRef = null;
|
|
12676
|
+
this.currentPopoverFieldId = null;
|
|
12677
|
+
}
|
|
12678
|
+
}
|
|
12679
|
+
});
|
|
12668
12680
|
}
|
|
12669
12681
|
updateRecordId(recordId) {
|
|
12670
12682
|
this.recordId.set(recordId);
|
|
@@ -12695,6 +12707,7 @@ class RecordDetailComponent {
|
|
|
12695
12707
|
const origin = e.currentTarget;
|
|
12696
12708
|
const position = fieldMenuOrigin.getBoundingClientRect();
|
|
12697
12709
|
this.fieldMenuActive.set({ [fieldId]: true });
|
|
12710
|
+
this.currentPopoverFieldId = fieldId;
|
|
12698
12711
|
let isSelfClose = false;
|
|
12699
12712
|
this.fieldMenuPopoverRef =
|
|
12700
12713
|
this.thyPopover.open(AITableFieldMenu, {
|
|
@@ -12720,6 +12733,7 @@ class RecordDetailComponent {
|
|
|
12720
12733
|
this.fieldMenuActive.set({ [fieldId]: false });
|
|
12721
12734
|
}
|
|
12722
12735
|
this.fieldMenuPopoverRef = null;
|
|
12736
|
+
this.currentPopoverFieldId = null;
|
|
12723
12737
|
});
|
|
12724
12738
|
}
|
|
12725
12739
|
}
|