fix(editor): remove selection when click New Record button (#11073)

fix: BS-2847
This commit is contained in:
zzj3720
2025-03-21 10:17:13 +00:00
parent 980952a9b4
commit a05d9b7817
2 changed files with 8 additions and 4 deletions
@@ -52,8 +52,9 @@ export class MobileTableGroup extends SignalWatcher(
private readonly clickAddRow = () => {
this.view.rowAdd('end', this.group?.key);
const selectionController = this.viewEle.selectionController;
selectionController.selection = undefined;
requestAnimationFrame(() => {
const selectionController = this.viewEle.selectionController;
const index = this.view.properties$.value.findIndex(
v => v.type$.value === 'title'
);
@@ -70,8 +71,9 @@ export class MobileTableGroup extends SignalWatcher(
private readonly clickAddRowInStart = () => {
this.view.rowAdd('start', this.group?.key);
const selectionController = this.viewEle.selectionController;
selectionController.selection = undefined;
requestAnimationFrame(() => {
const selectionController = this.viewEle.selectionController;
const index = this.view.properties$.value.findIndex(
v => v.type$.value === 'title'
);
@@ -69,8 +69,9 @@ export class TableGroup extends SignalWatcher(
private readonly clickAddRow = () => {
this.view.rowAdd('end', this.group?.key);
const selectionController = this.viewEle.selectionController;
selectionController.selection = undefined;
requestAnimationFrame(() => {
const selectionController = this.viewEle.selectionController;
const index = this.view.properties$.value.findIndex(
v => v.type$.value === 'title'
);
@@ -87,8 +88,9 @@ export class TableGroup extends SignalWatcher(
private readonly clickAddRowInStart = () => {
this.view.rowAdd('start', this.group?.key);
const selectionController = this.viewEle.selectionController;
selectionController.selection = undefined;
requestAnimationFrame(() => {
const selectionController = this.viewEle.selectionController;
const index = this.view.properties$.value.findIndex(
v => v.type$.value === 'title'
);