Skip to content

Commit

Permalink
Code review changes 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mila2999 committed Apr 5, 2024
1 parent 477c6dd commit 1e310ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export interface DropdownComponentProps extends VibeComponentProps {
* The component's value.
* When passed, makes this a [controlled](https://reactjs.org/docs/forms.html#controlled-components) component.
*/
value?: DropdownOption[];
value?: DropdownOption[] | DropdownOption;
/**
* Select menu size from `Dropdown.size` - Dropdown.sizes.LARGE | Dropdown.sizes.MEDIUM | Dropdown.sizes.SMALL
*/
Expand Down Expand Up @@ -229,7 +229,7 @@ export interface DropdownComponentProps extends VibeComponentProps {
* If menu should be closed on scroll - helpful for some tricky use cases
* @default false, but true when insideOverflowContainer or insideOverflowWithTransformContainer are true
*/
closeMenuOnScroll?: ((event: React.FocusEvent) => boolean) | boolean;
closeMenuOnScroll?: boolean;
/**
* callback to be called when `multiline` is `true` and the option is removed
*/
Expand Down Expand Up @@ -360,7 +360,7 @@ const Dropdown: VibeComponent<DropdownComponentProps, HTMLDivElement> = forwardR
const controlRef = useRef();
const overrideMenuPortalTarget =
menuPortalTarget || (popupsContainerSelector && document.querySelector(popupsContainerSelector));
const overrideDefaultValue = useMemo(() => {
const overrideDefaultValue: DropdownOption | DropdownOption[] = useMemo(() => {
if (defaultValue) {
return Array.isArray(defaultValue)
? defaultValue.map(df => ({ ...df, isMandatory: true }))
Expand Down

0 comments on commit 1e310ab

Please sign in to comment.