-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Labels
Description
SelectPanel multiple variant does not support dynamic labels
Note
Primer's React implementation allows for this behavior by customizing the Button passed in as renderAnchor:
<FormControl>
<FormControl.Label>Labels</FormControl.Label>
<SelectPanel title="Select labels" placeholder="Select labels" subtitle="Use labels to organize issues and pull requests" renderAnchor={({
children,
...anchorProps
}) => <Button trailingAction={TriangleDownIcon} {...anchorProps} aria-haspopup="dialog">
{children}
</Button>} open={open} onOpenChange={setOpen} items={filteredItems} selected={selected} onSelectedChange={setSelected} onFilterChange={setFilter} width="medium" message={filteredItems.length === 0 ? NoResultsMessage(filter) : undefined} />
</FormControl>(example taken from Primer React Storybook)