Skip to content

Commit

Permalink
DSD-1609: Enabled multi-select and implemented v2 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepika Gonuguntla committed Dec 11, 2023
1 parent 38ba043 commit a9b2acb
Show file tree
Hide file tree
Showing 7 changed files with 203 additions and 183 deletions.
2 changes: 1 addition & 1 deletion src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const getElementsFromData = (
isAlwaysRendered: boolean = false,
isDarkMode: boolean,
panelMaxHeight: string,
buttonRef: any,
buttonRef: any
) => {
const colorMap = isDarkMode
? {
Expand Down
3 changes: 2 additions & 1 deletion src/components/MultiSelect/MultiSelect.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ const meta: Meta<typeof MultiSelect> = {
},
items: { control: false },
listOverflow: {
description: "Value used to view the all items for the MultiSelect component",
description:
"Value used to view the all items for the MultiSelect component",
control: "radio",
options: ["scroll", "expand"],
table: { defaultValue: { summary: "scroll" } },
Expand Down
20 changes: 7 additions & 13 deletions src/components/MultiSelect/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@ export interface MultiSelectItem {
children?: MultiSelectItem[];
}

export const multiSelectWidthsArray = [
"fitContent",
"full",
] as const;
export const multiSelectWidthsArray = ["fitContent", "full"] as const;
export type MultiSelectWidths = typeof multiSelectWidthsArray[number];

export const multiSelectListOverflowArray = [
"scroll",
"expand"
] as const;
export type multiSelectListOverflowTypes = typeof multiSelectListOverflowArray[number];

export const multiSelectListOverflowArray = ["scroll", "expand"] as const;
export type multiSelectListOverflowTypes =
typeof multiSelectListOverflowArray[number];

export interface SelectedItems {
[name: string]: { items: string[] };
Expand All @@ -33,7 +27,7 @@ interface MultiSelectCommonProps {
id: string;
/** Set the default open or closed state of the Multiselect. */
isDefaultOpen?: boolean;
/** Boolean value used to enable the component's search functionality
/** Boolean value used to enable the component's search functionality
* The default value is false. */
isSearchable?: boolean;
/** Boolean value used to control how the MultiSelect component will render within the page and interact with other DOM elements.
Expand All @@ -48,15 +42,15 @@ interface MultiSelectCommonProps {
/** The label text rendered within the MultiSelect. */
buttonText: string;
/** Numeric value to set the maximum number of checkbox items
* The default value is 5. */
* The default value is 5. */
defaultItemsVisible: number;
/** The action to perform for clear/reset button of MultiSelect. */
onClear?: () => void;

showLabel: boolean;
/** Boolean value used to toggle the visibility of the Show All button
* The default value is false. */
showAll: boolean
showAll: boolean;
/** The type of MultiSelect that will be rendered. */
type: "listbox" | "dialog";
/** The selected items state (items that were checked by user). */
Expand Down
Loading

0 comments on commit a9b2acb

Please sign in to comment.