Jelajahi Sumber

add activeComponents for tab contents' validation

kaoritokashiki 5 tahun lalu
induk
melakukan
b986e0e81a

+ 2 - 2
src/client/js/components/PageAccessoriesModal.jsx

@@ -79,8 +79,7 @@ const PageAccessoriesModal = (props) => {
           </Nav>
           <TabContent activeTab={props.activeTab}>
             <TabPane tabId="attachment" className="p-4">
-              <PageAttachment />
-              {/* {activeComponents.has('global-notification') && <GlobalNotification />} */}
+              {props.activeComponents.has('attachment') && <PageAttachment /> }
             </TabPane>
           </TabContent>
         </ModalBody>
@@ -103,6 +102,7 @@ PageAccessoriesModal.propTypes = {
   isOpen: PropTypes.bool.isRequired,
   onClose: PropTypes.func,
   activeTab: PropTypes.string.isRequired,
+  activeComponents: PropTypes.string.isRequired,
   onSwitch: PropTypes.func,
 };
 

+ 1 - 0
src/client/js/components/TopOfTableContents.jsx

@@ -44,6 +44,7 @@ const TopOfTableContents = (props) => {
           onClose={closePageAccessoriesModal}
           activeTab={activeTab}
           onSwitch={switchActiveTab}
+          activeComponents={activeComponents}
         />
       </>
     );