Skip to content

Commit

Permalink
fix(range-selector): focus after confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
Gggpound committed Nov 11, 2024
1 parent c429541 commit 832ecd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/sheets-formula-ui/src/views/range-selector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ export function RangeSelector(props: IRangeSelectorProps) {
rangeDialogVisibleSet(false);
onRangeSelectorDialogVisibleChange(false);
setTimeout(() => {
isFocusSet(true);
editor?.setSelectionRanges([{ startOffset: text.length, endOffset: text.length }]);
focus();
}, 30);
};

Expand All @@ -335,6 +337,7 @@ export function RangeSelector(props: IRangeSelectorProps) {
setTimeout(() => {
rangeDialogVisibleSet(true);
onRangeSelectorDialogVisibleChange(true);
isFocusSet(false);
}, 30);
}
};
Expand Down

0 comments on commit 832ecd1

Please sign in to comment.