8191 command k workflow trigger for selected record (#8315)
Closes #8191 https://github.com/user-attachments/assets/694da229-cc91-4df2-97a0-49cd5dabcf12
This commit is contained in:
@ -47,15 +47,29 @@ export const useCommandMenu = () => {
|
||||
|
||||
const actionCommands = actionMenuEntries
|
||||
.getValue()
|
||||
?.filter((actionMenuEntry) => actionMenuEntry.type === 'standard')
|
||||
?.map((actionMenuEntry) => ({
|
||||
id: actionMenuEntry.key,
|
||||
label: actionMenuEntry.label,
|
||||
Icon: actionMenuEntry.Icon,
|
||||
onCommandClick: actionMenuEntry.onClick,
|
||||
type: CommandType.Action,
|
||||
type: CommandType.StandardAction,
|
||||
}));
|
||||
|
||||
setCommands([...commands, ...actionCommands]);
|
||||
const workflowRunCommands = actionMenuEntries
|
||||
.getValue()
|
||||
?.filter(
|
||||
(actionMenuEntry) => actionMenuEntry.type === 'workflow-run',
|
||||
)
|
||||
?.map((actionMenuEntry) => ({
|
||||
id: actionMenuEntry.key,
|
||||
label: actionMenuEntry.label,
|
||||
Icon: actionMenuEntry.Icon,
|
||||
onCommandClick: actionMenuEntry.onClick,
|
||||
type: CommandType.WorkflowRun,
|
||||
}));
|
||||
|
||||
setCommands([...commands, ...actionCommands, ...workflowRunCommands]);
|
||||
}
|
||||
|
||||
setIsCommandMenuOpened(true);
|
||||
|
||||
Reference in New Issue
Block a user