From 574e02abbe9536e7abd469c4ced38a8381d93168 Mon Sep 17 00:00:00 2001 From: Aleksander Nicacio da Silva Date: Thu, 19 Oct 2023 16:35:50 -0300 Subject: [PATCH 1/4] feat: added prop renderItem to PaginatedMultiSelect --- .../src/components/PaginatedSelect/PaginatedMultiSelect.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/fuselage/src/components/PaginatedSelect/PaginatedMultiSelect.tsx b/packages/fuselage/src/components/PaginatedSelect/PaginatedMultiSelect.tsx index 28102febae..642f7f52f8 100644 --- a/packages/fuselage/src/components/PaginatedSelect/PaginatedMultiSelect.tsx +++ b/packages/fuselage/src/components/PaginatedSelect/PaginatedMultiSelect.tsx @@ -16,6 +16,7 @@ import Chip from '../Chip'; import Flex from '../Flex'; import { Icon } from '../Icon'; import Margins from '../Margins'; +import Option from '../Option'; import { useVisible } from '../Options/useVisible'; import { OptionsPaginated } from '../OptionsPaginated'; import Position from '../Position'; @@ -41,6 +42,7 @@ type PaginatedMultiSelectProps = Omit< renderOptions?: ( props: ComponentProps ) => ReactElement | null; + renderItem?: (props: ComponentProps) => ReactElement | null; anchor?: any; }; @@ -55,6 +57,7 @@ const PaginatedMultiSelect = ({ onChange = () => {}, placeholder, renderOptions: OptionsComponent = OptionsPaginated, + renderItem = Option, endReached, ...props }: PaginatedMultiSelectProps) => { @@ -191,6 +194,7 @@ const PaginatedMultiSelect = ({ options={options} cursor={-1} endReached={endReached} + renderItem={renderItem} onSelect={([value]) => { toggleOption(value); }} From 22c6e8e3bae240d43715848eaaa1bedff253e569 Mon Sep 17 00:00:00 2001 From: Aleksander Nicacio da Silva Date: Thu, 19 Oct 2023 17:07:10 -0300 Subject: [PATCH 2/4] chore: changeset --- .changeset/twelve-yaks-study.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/twelve-yaks-study.md diff --git a/.changeset/twelve-yaks-study.md b/.changeset/twelve-yaks-study.md new file mode 100644 index 0000000000..90bf9bce53 --- /dev/null +++ b/.changeset/twelve-yaks-study.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/fuselage": patch +--- + +Added property `renderItem` to the PaginatedMultiSelect component From 2316ac8df00ba3543da0def94a917b89f7e59373 Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Thu, 19 Oct 2023 17:34:33 -0300 Subject: [PATCH 3/4] chore: changeset --- .changeset/twelve-yaks-study.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/twelve-yaks-study.md b/.changeset/twelve-yaks-study.md index 90bf9bce53..621b848eea 100644 --- a/.changeset/twelve-yaks-study.md +++ b/.changeset/twelve-yaks-study.md @@ -1,5 +1,5 @@ --- -"@rocket.chat/fuselage": patch +"@rocket.chat/fuselage": minor --- -Added property `renderItem` to the PaginatedMultiSelect component +Add `renderItem` prop to the `PaginatedMultiSelect` component From 726a8a3592f90043929dda42d7c44cfb503c1b24 Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Thu, 19 Oct 2023 17:35:04 -0300 Subject: [PATCH 4/4] chore: changeset --- .changeset/twelve-yaks-study.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/twelve-yaks-study.md b/.changeset/twelve-yaks-study.md index 621b848eea..0a2950bbcf 100644 --- a/.changeset/twelve-yaks-study.md +++ b/.changeset/twelve-yaks-study.md @@ -2,4 +2,4 @@ "@rocket.chat/fuselage": minor --- -Add `renderItem` prop to the `PaginatedMultiSelect` component +feat(fuselage): Add `renderItem` prop to the `PaginatedMultiSelect` component