diff --git a/packages/core/src/components/menu/menuItem.tsx b/packages/core/src/components/menu/menuItem.tsx index 89c842c64a..05f40c5948 100644 --- a/packages/core/src/components/menu/menuItem.tsx +++ b/packages/core/src/components/menu/menuItem.tsx @@ -127,10 +127,9 @@ export interface MenuItemProps popoverProps?: Partial>; /** - * Whether this item should appear selected. - * Defining this will set the `aria-selected` attribute and apply a - * "check" or "blank" icon on the item (unless the `icon` prop is set, - * which always takes precedence). + * Whether this item should appear selected - `roleStructure` must be `"listoption"` for this to be + * applied. Defining this will set the `aria-selected` attribute and apply a small tick icon if `true`, + * and empty space for a small tick icon if `false` or `undefined`. * * @default undefined */ diff --git a/packages/docs-app/src/examples/core-examples/common/iconNames.ts b/packages/docs-app/src/examples/core-examples/common/iconNames.ts index 314dcde476..87e3e7bda8 100644 --- a/packages/docs-app/src/examples/core-examples/common/iconNames.ts +++ b/packages/docs-app/src/examples/core-examples/common/iconNames.ts @@ -16,14 +16,10 @@ import { type IconName, IconNames } from "@blueprintjs/icons"; -export const NONE = "(none)"; -export type IconNameOrNone = IconName | typeof NONE; - -export function getIconNames(): IconNameOrNone[] { - const iconNames = new Set(); +export function getIconNames(): IconName[] { + const iconNames = new Set(); for (const [, name] of Object.entries(IconNames)) { iconNames.add(name); } - iconNames.add(NONE); return Array.from(iconNames.values()); } diff --git a/packages/docs-app/src/examples/core-examples/common/iconSelect.tsx b/packages/docs-app/src/examples/core-examples/common/iconSelect.tsx index f3a85800bb..94b63d52fa 100644 --- a/packages/docs-app/src/examples/core-examples/common/iconSelect.tsx +++ b/packages/docs-app/src/examples/core-examples/common/iconSelect.tsx @@ -21,7 +21,7 @@ import { Alignment, Button, Classes, MenuItem } from "@blueprintjs/core"; import type { IconName } from "@blueprintjs/icons"; import { type ItemRenderer, Select } from "@blueprintjs/select"; -import { getIconNames, type IconNameOrNone, NONE } from "./iconNames"; +import { getIconNames } from "./iconNames"; const ICON_NAMES = getIconNames(); @@ -35,24 +35,25 @@ export class IconSelect extends React.PureComponent { public render() { const { disabled, iconName } = this.props; return ( -