8978 add navigation inside the command menu for showpage (#9103)
Closes #8978 - Added new options in the actions config files: `shortLabel`, `availableOn` - Added two actions: Navigate to previous records and Navigate to next records - Modified `useRecordShowPagePagination` to loop on records when we are on first record and we hit previous or when we are on last record and we hit next - Introduced a new component state `contextStoreCurrentViewTypeComponentState`
This commit is contained in:
@ -99,8 +99,6 @@ export const PageHeader = ({
|
||||
hasClosePageButton,
|
||||
onClosePage,
|
||||
hasPaginationButtons,
|
||||
hasPreviousRecord,
|
||||
hasNextRecord,
|
||||
navigateToPreviousRecord,
|
||||
navigateToNextRecord,
|
||||
Icon,
|
||||
@ -140,14 +138,12 @@ export const PageHeader = ({
|
||||
Icon={IconChevronUp}
|
||||
size="small"
|
||||
variant="secondary"
|
||||
disabled={!hasPreviousRecord}
|
||||
onClick={() => navigateToPreviousRecord?.()}
|
||||
/>
|
||||
<IconButton
|
||||
Icon={IconChevronDown}
|
||||
size="small"
|
||||
variant="secondary"
|
||||
disabled={!hasNextRecord}
|
||||
onClick={() => navigateToNextRecord?.()}
|
||||
/>
|
||||
</>
|
||||
@ -166,24 +162,6 @@ export const PageHeader = ({
|
||||
</StyledLeftContainer>
|
||||
|
||||
<StyledPageActionContainer className="page-action-container">
|
||||
{isPageHeaderV2Enabled && hasPaginationButtons && (
|
||||
<>
|
||||
<IconButton
|
||||
Icon={IconChevronUp}
|
||||
size={isMobile ? 'medium' : 'small'}
|
||||
variant="secondary"
|
||||
disabled={!hasPreviousRecord}
|
||||
onClick={() => navigateToPreviousRecord?.()}
|
||||
/>
|
||||
<IconButton
|
||||
Icon={IconChevronDown}
|
||||
size={isMobile ? 'medium' : 'small'}
|
||||
variant="secondary"
|
||||
disabled={!hasNextRecord}
|
||||
onClick={() => navigateToNextRecord?.()}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
{children}
|
||||
</StyledPageActionContainer>
|
||||
</StyledTopBarContainer>
|
||||
|
||||
Reference in New Issue
Block a user