Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(design): add blur to input number (#3971)
VicKun2272eaece600
diff --git a/packages/design/src/components/input-number/InputNumber.tsx b/packages/design/src/components/input-number/InputNumber.tsxindex e2337ed1a9..ef5278bc59 100644--- a/packages/design/src/components/input-number/InputNumber.tsx+++ b/packages/design/src/components/input-number/InputNumber.tsx@@ -70,6 +70,12 @@ export interface IInputNumberProps {*/onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;+ /**+ * Callback when user blur+ * @param e+ */+ onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;+/*** Callback when user press a key* @param e@@ -103,6 +109,7 @@ export const InputNumber = forwardRef<HTMLInputElement, IInputNumberProps>((proponKeyDown,onChange,onPressEnter,+ onBlur,} = props;function handleChange(value: number | null) {@@ -127,6 +134,7 @@ export const InputNumber = forwardRef<HTMLInputElement, IInputNumberProps>((proponKeyDown={onKeyDown}onChange={handleChange}onPressEnter={onPressEnter}+ onBlur={onBlur}/>);});