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 #6113: MultiSelect loading and loadingIcon types #6114

Merged
merged 1 commit into from
Mar 14, 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
1 change: 1 addition & 0 deletions components/lib/multiselect/MultiSelectBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ export const MultiSelectBase = ComponentBase.extend({
itemClassName: null,
itemTemplate: null,
loading: false,
loadingIcon: null,
maxSelectedLabels: null,
name: null,
onBlur: null,
Expand Down
11 changes: 10 additions & 1 deletion components/lib/multiselect/multiselect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ export interface MultiSelectProps extends Omit<React.DetailedHTMLProps<React.Inp
/**
* Icon class of the dropdown icon.
*/
dropdownIcon?: IconType<MultiSelectProps>;
dropdownIcon?: IconType<MultiSelectProps> | undefined;
/**
* Template to display when filtering does not return any results.
* @defaultValue No records found
Expand Down Expand Up @@ -550,6 +550,15 @@ export interface MultiSelectProps extends Omit<React.DetailedHTMLProps<React.Inp
* Function that gets the option and returns the content for it.
*/
itemTemplate?: React.ReactNode | ((option: any) => React.ReactNode);
/**
* Displays a loader to indicate data load is in progress.
* @defaultValue false
*/
loading?: boolean | undefined;
/**
* The icon to show while indicating data load is in progress.
*/
loadingIcon?: IconType<MultiSelectProps> | undefined;
/**
* Decides how many selected item labels to show at most.
*/
Expand Down
Loading