diff --git a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/index.tsx b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/index.tsx index adaad4748d0..347adee5d3a 100644 --- a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/index.tsx +++ b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/index.tsx @@ -91,39 +91,39 @@ export const RuleEdit = (props: IRuleEditProps) => { return defaultType; } switch (type) { - case CFRuleType.highlightCell:{ + case CFRuleType.highlightCell: { const subType = props.rule?.rule.subType; switch (subType) { case CFSubRuleType.number: case CFSubRuleType.text: case CFSubRuleType.duplicateValues: case CFSubRuleType.uniqueValues: - case CFSubRuleType.timePeriod:{ + case CFSubRuleType.timePeriod: { return '1'; } case CFSubRuleType.average: - case CFSubRuleType.rank:{ + case CFSubRuleType.rank: { return '2'; } - case CFSubRuleType.formula:{ + case CFSubRuleType.formula: { return '5'; } } break; } - case CFRuleType.dataBar:{ + case CFRuleType.dataBar: { return '3'; } - case CFRuleType.colorScale:{ + case CFRuleType.colorScale: { return '4'; } - case CFRuleType.iconSet:{ + case CFRuleType.iconSet: { return '6'; } } return defaultType; }); - const result = useRef < Parameters>(); + const result = useRef>(); const interceptorManager = useMemo(() => { const _interceptorManager = new InterceptorManager({ beforeSubmit, submit }); return _interceptorManager; @@ -131,25 +131,25 @@ export const RuleEdit = (props: IRuleEditProps) => { const StyleEditor = useMemo(() => { switch (ruleType) { - case '1':{ + case '1': { return HighlightCellStyleEditor; } - case '2':{ + case '2': { return RankStyleEditor; } - case '3':{ + case '3': { return DataBarStyleEditor; } - case '4':{ + case '4': { return ColorScaleStyleEditor; } - case '5':{ + case '5': { return FormulaStyleEditor; } - case '6':{ + case '6': { return IconSet; } - default :{ + default: { return HighlightCellStyleEditor; } } @@ -224,7 +224,15 @@ export const RuleEdit = (props: IRuleEditProps) => {
{localeService.t('sheet.cf.panel.range')}
- +
{localeService.t('sheet.cf.panel.styleType')}
diff --git a/packages/ui/src/components/editor/TextEditor.tsx b/packages/ui/src/components/editor/TextEditor.tsx index dc072b07c53..43638f9ec0d 100644 --- a/packages/ui/src/components/editor/TextEditor.tsx +++ b/packages/ui/src/components/editor/TextEditor.tsx @@ -115,8 +115,6 @@ export function TextEditor(props: ITextEditorProps & Omit(''); const [validationVisible, setValidationVisible] = useState(isValueValid); @@ -171,6 +171,9 @@ export function TextEditor(props: ITextEditorProps & Omit { setActive(state); onActive && onActive(state);