SULLEY\ryo-h 4 лет назад
Родитель
Сommit
19a3849466

+ 2 - 2
packages/app/src/components/SearchPage.jsx

@@ -224,8 +224,8 @@ class SearchPage extends React.Component {
         searchingKeyword={this.state.searchingKeyword}
         appContainer={this.props.appContainer}
         onSearchInvoked={this.searchHandler}
-        onExcludeUserPagesSwitch={this.switchExcludeUserPagesHandler}
-        onExcludeTrashPagesSwitch={this.switchExcludeTrashPagesHandler}
+        onExcludeUserPagesSwitched={this.switchExcludeUserPagesHandler}
+        onExcludeTrashPagesSwitched={this.switchExcludeTrashPagesHandler}
       >
       </SearchControl>
     );

+ 8 - 8
packages/app/src/components/SearchPage/SearchControl.tsx

@@ -10,8 +10,8 @@ type Props = {
   searchingKeyword: string,
   appContainer: AppContainer,
   onSearchInvoked: (data : any[]) => boolean,
-  onExcludeUserPagesSwitch?: () => void,
-  onExcludeTrashPagesSwitch?: () => void,
+  onExcludeUserPagesSwitched?: () => void,
+  onExcludeTrashPagesSwitched?: () => void,
 }
 
 const SearchControl: FC <Props> = (props: Props) => {
@@ -23,14 +23,14 @@ const SearchControl: FC <Props> = (props: Props) => {
   const { t } = useTranslation('');
 
   const switchExcludeUserPagesHandler = () => {
-    if (props.onExcludeUserPagesSwitch != null) {
-      props.onExcludeUserPagesSwitch();
+    if (props.onExcludeUserPagesSwitched != null) {
+      props.onExcludeUserPagesSwitched();
     }
   };
 
   const switchExcludeTrashPagesHandler = () => {
-    if (props.onExcludeTrashPagesSwitch != null) {
-      props.onExcludeTrashPagesSwitch();
+    if (props.onExcludeTrashPagesSwitched != null) {
+      props.onExcludeTrashPagesSwitched();
     }
   };
 
@@ -62,8 +62,8 @@ const SearchControl: FC <Props> = (props: Props) => {
       <SearchOptionModal
         isOpen={isFileterOptionModalShown || false}
         onClose={closeSearchOptionModalHandler}
-        onExcludeUserPagesSwitch={switchExcludeUserPagesHandler}
-        onExcludeTrashPagesSwitch={switchExcludeTrashPagesHandler}
+        onExcludeUserPagesSwitched={switchExcludeUserPagesHandler}
+        onExcludeTrashPagesSwitched={switchExcludeTrashPagesHandler}
       />
     );
   };

+ 4 - 4
packages/app/src/components/SearchPage/SearchOptionModal.tsx

@@ -9,8 +9,8 @@ import {
 type Props = {
   isOpen: boolean,
   onClose?: () => void,
-  onExcludeUserPagesSwitch?: () => void,
-  onExcludeTrashPagesSwitch?: () => void,
+  onExcludeUserPagesSwitched?: () => void,
+  onExcludeTrashPagesSwitched?: () => void,
   // todo: implement this method
   // refs: https://redmine.weseek.co.jp/issues/81845
   onClickFilteringSearchResultButton?: () => void,
@@ -42,7 +42,7 @@ const SearchOptionModal: FC<Props> = (props: Props) => {
               <input
                 className="mr-2"
                 type="checkbox"
-                onClick={props.onExcludeUserPagesSwitch}
+                onClick={props.onExcludeUserPagesSwitched}
               />
               {t('Include Subordinated Target Page', { target: '/user' })}
             </label>
@@ -54,7 +54,7 @@ const SearchOptionModal: FC<Props> = (props: Props) => {
               <input
                 className="mr-2"
                 type="checkbox"
-                onClick={props.onExcludeTrashPagesSwitch}
+                onClick={props.onExcludeTrashPagesSwitched}
               />
               {t('Include Subordinated Target Page', { target: '/trash' })}
             </label>