fix(frontend):Prevent record type select dropdown from opening when viewing a workflow version (#12495)
Closes #12003 https://github.com/user-attachments/assets/07561cf6-a45d-4f7e-815e-550421d1bd9f
This commit is contained in:
@ -198,66 +198,67 @@ export const WorkflowEditTriggerDatabaseEventForm = ({
|
|||||||
}
|
}
|
||||||
dropdownComponents={
|
dropdownComponents={
|
||||||
<>
|
<>
|
||||||
{isSystemObjectsOpen ? (
|
{!triggerOptions.readonly &&
|
||||||
<DropdownContent>
|
(isSystemObjectsOpen ? (
|
||||||
<DropdownMenuHeader
|
<DropdownContent>
|
||||||
StartComponent={
|
<DropdownMenuHeader
|
||||||
<DropdownMenuHeaderLeftComponent
|
StartComponent={
|
||||||
onClick={handleBack}
|
<DropdownMenuHeaderLeftComponent
|
||||||
Icon={IconChevronLeft}
|
onClick={handleBack}
|
||||||
/>
|
Icon={IconChevronLeft}
|
||||||
}
|
/>
|
||||||
>
|
}
|
||||||
<Trans>Advanced</Trans>
|
>
|
||||||
</DropdownMenuHeader>
|
<Trans>Advanced</Trans>
|
||||||
<DropdownMenuSearchInput
|
</DropdownMenuHeader>
|
||||||
autoFocus
|
<DropdownMenuSearchInput
|
||||||
value={searchInputValue}
|
autoFocus
|
||||||
onChange={handleSearchInputChange}
|
value={searchInputValue}
|
||||||
/>
|
onChange={handleSearchInputChange}
|
||||||
<DropdownMenuSeparator />
|
/>
|
||||||
<DropdownMenuItemsContainer hasMaxHeight>
|
<DropdownMenuSeparator />
|
||||||
{filteredSystemObjects.map((option) => (
|
<DropdownMenuItemsContainer hasMaxHeight>
|
||||||
<MenuItem
|
{filteredSystemObjects.map((option) => (
|
||||||
key={option.value}
|
<MenuItem
|
||||||
LeftIcon={option.Icon}
|
key={option.value}
|
||||||
text={option.label}
|
LeftIcon={option.Icon}
|
||||||
onClick={() => handleOptionClick(option.value)}
|
text={option.label}
|
||||||
/>
|
onClick={() => handleOptionClick(option.value)}
|
||||||
))}
|
/>
|
||||||
</DropdownMenuItemsContainer>
|
))}
|
||||||
</DropdownContent>
|
</DropdownMenuItemsContainer>
|
||||||
) : (
|
</DropdownContent>
|
||||||
<DropdownContent>
|
) : (
|
||||||
<DropdownMenuSearchInput
|
<DropdownContent>
|
||||||
autoFocus
|
<DropdownMenuSearchInput
|
||||||
value={searchInputValue}
|
autoFocus
|
||||||
onChange={handleSearchInputChange}
|
value={searchInputValue}
|
||||||
/>
|
onChange={handleSearchInputChange}
|
||||||
<DropdownMenuSeparator />
|
/>
|
||||||
<DropdownMenuItemsContainer hasMaxHeight>
|
<DropdownMenuSeparator />
|
||||||
{filteredRegularObjects.map((option) => (
|
<DropdownMenuItemsContainer hasMaxHeight>
|
||||||
<MenuItem
|
{filteredRegularObjects.map((option) => (
|
||||||
key={option.value}
|
<MenuItem
|
||||||
LeftIcon={option.Icon}
|
key={option.value}
|
||||||
text={option.label}
|
LeftIcon={option.Icon}
|
||||||
onClick={() => handleOptionClick(option.value)}
|
text={option.label}
|
||||||
/>
|
onClick={() => handleOptionClick(option.value)}
|
||||||
))}
|
/>
|
||||||
{(!searchInputValue ||
|
))}
|
||||||
'advanced'.includes(
|
{(!searchInputValue ||
|
||||||
searchInputValue.toLowerCase(),
|
'advanced'.includes(
|
||||||
)) && (
|
searchInputValue.toLowerCase(),
|
||||||
<MenuItem
|
)) && (
|
||||||
text="Advanced"
|
<MenuItem
|
||||||
LeftIcon={IconSettings}
|
text="Advanced"
|
||||||
onClick={handleSystemObjectsClick}
|
LeftIcon={IconSettings}
|
||||||
hasSubMenu
|
onClick={handleSystemObjectsClick}
|
||||||
/>
|
hasSubMenu
|
||||||
)}
|
/>
|
||||||
</DropdownMenuItemsContainer>
|
)}
|
||||||
</DropdownContent>
|
</DropdownMenuItemsContainer>
|
||||||
)}
|
</DropdownContent>
|
||||||
|
))}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
dropdownHotkeyScope={{ scope: SelectHotkeyScope.Select }}
|
dropdownHotkeyScope={{ scope: SelectHotkeyScope.Select }}
|
||||||
|
|||||||
Reference in New Issue
Block a user