Skip to content

Commit

Permalink
fix(fuselage): change PaginatedMultiSelectFiltered component to use P…
Browse files Browse the repository at this point in the history
…aginatedMultiSelect props (#1322)

Co-authored-by: dougfabris <devfabris@gmail.com>
  • Loading branch information
csuadev and dougfabris authored Mar 19, 2024
1 parent 91e5a0e commit f67ac5d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
5 changes: 5 additions & 0 deletions .changeset/thick-kids-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/fuselage": patch
---

fix(fuselage): Added missing render property from PaginatedMultiselect on PaginatedMultiSelectFiltered component to allow rendering items on it.
Original file line number Diff line number Diff line change
@@ -1,32 +1,13 @@
import type { ComponentProps, Ref, FormEvent, ReactElement } from 'react';
import type { ComponentProps, Ref, FormEvent } from 'react';
import React, { useCallback, forwardRef } from 'react';

import type Box from '../Box';
import Flex from '../Flex';
import { InputBox } from '../InputBox';
import { type OptionsPaginated } from '../OptionsPaginated';
import PaginatedMultiSelect, {
type PaginatedMultiSelectOption,
} from './PaginatedMultiSelect';
import PaginatedMultiSelect from './PaginatedMultiSelect';

type PaginatedMultiSelectFilteredProps = Omit<
ComponentProps<typeof Box>,
'onChange' | 'value' | 'filter'
> & {
error?: boolean;
options: PaginatedMultiSelectOption[];
withTitle?: boolean;
placeholder?: string;
endReached?: (start?: number, end?: number) => void;
value?: PaginatedMultiSelectOption[];
onChange: (values: PaginatedMultiSelectOption[]) => void;
renderOptions?: (
props: ComponentProps<typeof OptionsPaginated>
) => ReactElement | null;
anchor?: any;
filter?: string;
type PaginatedMultiSelectFilteredProps = {
setFilter?: (value: string) => void;
};
} & ComponentProps<typeof PaginatedMultiSelect>;

export const PaginatedMultiSelectFiltered = ({
filter,
Expand Down Expand Up @@ -67,8 +48,8 @@ export const PaginatedMultiSelectFiltered = ({
<PaginatedMultiSelect
filter={filter}
options={options}
{...props}
anchor={anchor}
{...props}
/>
);
};

0 comments on commit f67ac5d

Please sign in to comment.