Do not display back button at the root level of the command menu (#10073)
Do not display back button at the root level of the command menu
This commit is contained in:
@ -126,13 +126,15 @@ export const CommandMenuTopBar = () => {
|
|||||||
<StyledContentContainer>
|
<StyledContentContainer>
|
||||||
{isCommandMenuV2Enabled && (
|
{isCommandMenuV2Enabled && (
|
||||||
<>
|
<>
|
||||||
<CommandMenuContextChip
|
{commandMenuPage !== CommandMenuPages.Root && (
|
||||||
Icons={[<IconChevronLeft size={theme.icon.size.sm} />]}
|
<CommandMenuContextChip
|
||||||
onClick={() => {
|
Icons={[<IconChevronLeft size={theme.icon.size.sm} />]}
|
||||||
goBackFromCommandMenu();
|
onClick={() => {
|
||||||
}}
|
goBackFromCommandMenu();
|
||||||
testId="command-menu-go-back-button"
|
}}
|
||||||
/>
|
testId="command-menu-go-back-button"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{isDefined(contextStoreCurrentObjectMetadataId) &&
|
{isDefined(contextStoreCurrentObjectMetadataId) &&
|
||||||
commandMenuPage !== CommandMenuPages.SearchRecords ? (
|
commandMenuPage !== CommandMenuPages.SearchRecords ? (
|
||||||
<CommandMenuContextChipGroupsWithRecordSelection
|
<CommandMenuContextChipGroupsWithRecordSelection
|
||||||
|
|||||||
@ -197,17 +197,6 @@ export const NoResultsSearchFallback: Story = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GoBack: Story = {
|
|
||||||
play: async () => {
|
|
||||||
const canvas = within(document.body);
|
|
||||||
const goBackButton = await canvas.findByTestId(
|
|
||||||
'command-menu-go-back-button',
|
|
||||||
);
|
|
||||||
await userEvent.click(goBackButton);
|
|
||||||
await expect(goBackButton).not.toBeVisible();
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export const ClickOnSearchRecordsAndGoBack: Story = {
|
export const ClickOnSearchRecordsAndGoBack: Story = {
|
||||||
play: async () => {
|
play: async () => {
|
||||||
const canvas = within(document.body);
|
const canvas = within(document.body);
|
||||||
|
|||||||
Reference in New Issue
Block a user