fix: correct font variable usage and improve type handling in dynamic filter
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 7m18s

This commit is contained in:
2025-06-28 12:01:25 +05:00
parent 79ecb625d9
commit 3f92a00bfe
3 changed files with 15 additions and 8 deletions

View File

@ -244,11 +244,11 @@ export default function DynamicFilter<
if (input.type === "checkbox-group") {
(clearedInputState as FilterValues<TFilterKeys, TInputs>)[
input.name as TFilterKeys
] = [] as any;
} else {
] = [] as FilterValues<TFilterKeys, TInputs>[typeof input.name];
} else if (input.type === "radio-group" || input.type === "string" || input.type === "number") {
(clearedInputState as FilterValues<TFilterKeys, TInputs>)[
input.name as TFilterKeys
] = "" as any;
] = "" as FilterValues<TFilterKeys, TInputs>[typeof input.name];
}
}
setInputValues(clearedInputState as FilterValues<TFilterKeys, TInputs>);
@ -297,7 +297,7 @@ export default function DynamicFilter<
// Dynamic `prettyPrintFilter` for badges
const prettyPrintFilter = (
key: TFilterKeys,
_key: TFilterKeys,
value: string | string[],
config: FilterInputConfig<TFilterKeys>,
) => {
@ -342,7 +342,7 @@ export default function DynamicFilter<
<Drawer open={isOpen} onOpenChange={setIsOpen}>
<DrawerTrigger asChild>
<Button
className="w-full sm:w-48 flex items-end justify-between"
className="w-full font-barlow sm:w-48 flex items-end justify-between"
onClick={() => setIsOpen(!isOpen)}
variant="outline"
>