Skip to content

Commit b1879a4

Browse files
RajdeepKushwaha5anuj-kumarychirag-madlani
authored
fix(ui): add missing fontSize to SelectContext in Combobox and Autocomplete (#27435)
PR #27379 added fontSize as a required property to SelectContext but only updated select.tsx. This adds the missing fontSize property to combobox.tsx and autocomplete.tsx to fix the TypeScript build error (TS2741) that is currently blocking CI on all open PRs. Co-authored-by: Anujkumar Yadav <anujf0510@gmail.com> Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com>
1 parent cf6f110 commit b1879a4

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

openmetadata-ui-core-components/src/main/resources/ui/src/components/base/autocomplete/autocomplete.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,10 @@ export const AutocompleteBase = ({
415415

416416
useResizeObserver({ ref: triggerRef, onResize, box: 'border-box' });
417417

418-
const selectContextValue = useMemo(() => ({ size: 'sm' as const }), []);
418+
const selectContextValue = useMemo(
419+
() => ({ fontSize: 'md' as const, size: 'sm' as const }),
420+
[]
421+
);
419422

420423
const autocompleteContextValue = useMemo(
421424
() => ({

openmetadata-ui-core-components/src/main/resources/ui/src/components/base/select/combobox.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export const ComboBox = ({
139139
placeholder = 'Search',
140140
shortcut = true,
141141
size = 'sm',
142+
fontSize = 'md',
142143
children,
143144
items,
144145
shortcutClassName,
@@ -165,7 +166,7 @@ export const ComboBox = ({
165166
});
166167

167168
return (
168-
<SelectContext.Provider value={{ size }}>
169+
<SelectContext.Provider value={{ fontSize, size }}>
169170
<AriaComboBox menuTrigger="focus" {...otherProps}>
170171
{(state) => (
171172
<div className="tw:flex tw:flex-col tw:gap-1.5">

0 commit comments

Comments
 (0)