Parcourir la source

handleInputChange -> onChange?

Shun Miyazawa il y a 2 ans
Parent
commit
a5cbe8368a

+ 2 - 2
apps/app/src/components/Common/ClosableTextInput.tsx

@@ -17,7 +17,7 @@ type ClosableTextInputProps = {
   onPressEnter?(inputText: string | null): void
   onPressEnter?(inputText: string | null): void
   onPressEscape?: () => void
   onPressEscape?: () => void
   onClickOutside?(): void
   onClickOutside?(): void
-  handleInputChange?: (string) => void
+  onChange?(inputText: string): void
 }
 }
 
 
 const ClosableTextInput: FC<ClosableTextInputProps> = memo((props: ClosableTextInputProps) => {
 const ClosableTextInput: FC<ClosableTextInputProps> = memo((props: ClosableTextInputProps) => {
@@ -45,7 +45,7 @@ const ClosableTextInput: FC<ClosableTextInputProps> = memo((props: ClosableTextI
     setInputText(inputText);
     setInputText(inputText);
     setIsAbleToShowAlert(true);
     setIsAbleToShowAlert(true);
 
 
-    props.handleInputChange?.(inputText);
+    props.onChange?.(inputText);
   };
   };
 
 
   const onFocusHandler = async(e: React.ChangeEvent<HTMLInputElement>) => {
   const onFocusHandler = async(e: React.ChangeEvent<HTMLInputElement>) => {

+ 1 - 1
apps/app/src/components/PageHeader/PagePathHeader.tsx

@@ -102,7 +102,7 @@ export const PagePathHeader: FC<Props> = (props) => {
                 placeholder={t('Input page name')}
                 placeholder={t('Input page name')}
                 onPressEnter={onPressEnter}
                 onPressEnter={onPressEnter}
                 onPressEscape={onPressEscape}
                 onPressEscape={onPressEscape}
-                handleInputChange={onInputChange}
+                onChange={onInputChange}
                 validationTarget={ValidationTarget.PAGE}
                 validationTarget={ValidationTarget.PAGE}
               />
               />
             </div>
             </div>

+ 1 - 1
apps/app/src/components/PageHeader/PageTitleHeader.tsx

@@ -70,7 +70,7 @@ export const PageTitleHeader: FC<Props> = (props) => {
               value={editedPageTitle}
               value={editedPageTitle}
               onPressEnter={onPressEnter}
               onPressEnter={onPressEnter}
               onPressEscape={onPressEscape}
               onPressEscape={onPressEscape}
-              handleInputChange={onInputChange}
+              onChange={onInputChange}
               validationTarget={ValidationTarget.PAGE}
               validationTarget={ValidationTarget.PAGE}
             />
             />
           </div>
           </div>