Skip to content

Commit

Permalink
refactor: Introduces use-multiselect helper (#2759)
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-kot authored Sep 26, 2024
1 parent acc6d99 commit 50863f6
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 216 deletions.
4 changes: 4 additions & 0 deletions pages/property-filter/custom-forms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ export function OwnerMultiSelectForm({ value, onChange }: ExtendedOperatorFormPr
.filter((value): value is string => typeof value !== 'undefined')
)
}
statusType="finished"
filteringType="none"
expandToViewport={true}
keepOpen={true}
hideTokens={false}
inlineTokens={true}
/>
</FormField>
Expand Down
3 changes: 3 additions & 0 deletions src/internal/components/chart-filter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ function ChartFilter<T>({ series, i18nStrings, selectedSeries, onChange, ...rest
onChange={updateSelection}
className={styles['chart-filter']}
selectedAriaLabel={i18nStrings?.filterSelectedAriaLabel}
filteringType="none"
statusType="finished"
keepOpen={true}
hideTokens={true}
/>
</InternalFormField>
Expand Down
2 changes: 1 addition & 1 deletion src/internal/components/dropdown-status/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type UseDropdownStatus = ({
onRecoveryClick,
}: DropdownStatusPropsExtended) => DropdownStatusResult;

interface DropdownStatusResult {
export interface DropdownStatusResult {
isSticky: boolean;
content: React.ReactNode | null;
}
Expand Down
4 changes: 4 additions & 0 deletions src/multiselect/__tests__/analytics-metadata.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ test('Internal Multiselect does not render "component" metadata', () => {
selectedOptions={[]}
ariaLabel="multiselect with metadatada"
onChange={() => {}}
keepOpen={true}
hideTokens={false}
statusType="finished"
filteringType="none"
/>
);
const wrapper = createWrapper(renderResult.container).findMultiselect()!;
Expand Down
Loading

0 comments on commit 50863f6

Please sign in to comment.