Skip to content

ActionPanel default action not triggered if default action is Submenu #1168

@Bizangel

Description

@Bizangel

System information

  • Version: v0.20.3 (e550ea4)
  • Build info: GCC 15.2.0 - Release - LTO
  • Provenance: appimage
  • OS: Fedora Linux 43 (KDE Plasma Desktop Edition) - 43
  • QT Platform: wayland
  • DE: KDE/Wayland

Describe the bug

If a List has a default action - in which it's default / first action is of type ActionPanel.Submenu - then pressing enter or clicking does nothing.

Note the submenu is still accessible by manually

To Reproduce

Open an extension which has a List item with an ActionPanel - in which the ActionPanel.Submenu is the first action of the menu.
Press enter. Nothing happens.

Expected behavior

The submenu should be shown and gain focus. Such that:

  • First enter keypress allows to display / enable the submenu.
  • A subsequent keypress allows to choose the submenu option.

Additional context

Example:

export default function MyList() {
	return (
		<List
			filtering={false}
		>
			<List.Item
				title="ItemEntry"
				actions={
					<ActionPanel>
						<ActionPanel.Submenu title="Submenu Action">
							<Action
							title="SubAction 1"
							onAction={() => console.log("subaction1")}
							/>
							<Action
							title="SubAction 1"
							onAction={() => console.log("subaction2")}
							/>
						</ActionPanel.Submenu>
						<Action
							title="Secondary action"
							onAction={() => console.log("secondary action")}
						/>
					</ActionPanel>
				}
			/>
		</List>
	);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions