api 공통 모듈생성
search, api 공통 모듈 생성 공통모듈 화면 별 반영
This commit is contained in:
@@ -13,7 +13,10 @@ const TableHeader = ({
|
||||
handlePageSize,
|
||||
selectedRows = [],
|
||||
onAction,
|
||||
navigate
|
||||
navigate,
|
||||
pagination,
|
||||
goToNextPage,
|
||||
goToPrevPage
|
||||
}) => {
|
||||
const userInfo = useRecoilValue(authList);
|
||||
const { t } = useTranslation();
|
||||
@@ -48,7 +51,7 @@ const TableHeader = ({
|
||||
);
|
||||
}
|
||||
|
||||
const buttonTheme = button.disableWhen === 'noSelection' && selectedRows.length === 0
|
||||
const buttonTheme = (button.disableWhen === 'noSelection' && selectedRows.length === 0) || button.disableWhen === 'disable'
|
||||
? 'disable'
|
||||
: button.theme;
|
||||
|
||||
@@ -58,6 +61,7 @@ const TableHeader = ({
|
||||
theme={buttonTheme}
|
||||
text={button.text}
|
||||
handleClick={(e) => handleButtonClick(button, e)}
|
||||
disabled={button.disableWhen === 'disable'}
|
||||
/>
|
||||
);
|
||||
};
|
||||
@@ -71,6 +75,9 @@ const TableHeader = ({
|
||||
orderType={config.orderType}
|
||||
pageType={config.pageType}
|
||||
countType={config.countType}
|
||||
pagination={pagination}
|
||||
goToNextPage={goToNextPage}
|
||||
goToPrevPage={goToPrevPage}
|
||||
>
|
||||
{config.buttons.map(renderButton)}
|
||||
</ViewTableInfo>
|
||||
|
||||
Reference in New Issue
Block a user