Skip to content

Commit 4418065

Browse files
fix(ui): add missing fontSize to SelectContext providers in Combobox/Autocomplete
Unblocks CI on this PR. main is currently failing tsc --noEmit with TS2741 because #27379 made fontSize a required field on SelectContext but only updated select.tsx. combobox.tsx and autocomplete.tsx also provide that context and were missed, cascading into all py-tests and Playwright failures on every open PR. Mirrors the fix in PR #27435.
1 parent 83c69c3 commit 4418065

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)