Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Expose 'multiline' prop for TreeSelectField #1043

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/inputs/TreeSelectField/TreeSelectField.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ function Template(args: TreeSelectFieldProps<HasIdAndName, string>) {
label="Multiple options selected"
/>

<TestTreeSelectField
{...args}
multiline
values={multipleValueIds}
options={options}
placeholder="Select a project"
label="Multiple options selected - multiline prop"
/>

<TestTreeSelectField
{...args}
values={[]}
Expand Down
2 changes: 2 additions & 0 deletions src/inputs/TreeSelectField/TreeSelectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export interface TreeSelectFieldProps<O, V extends Value> extends BeamFocusableP
/** Whether to have all groups collapsed on initial load. Can also be configured individually, which overrides this behavior.
* @default false */
defaultCollapsed?: boolean;
/** Allow the field's height to grow up to a predefined height (currently 72px), then scroll. */
multiline?: boolean;
}

export function TreeSelectField<O, V extends Value>(props: TreeSelectFieldProps<O, V>): JSX.Element;
Expand Down
Loading