fix list filters

This commit is contained in:
jeffvli
2025-12-02 00:11:42 -08:00
parent 4abfbd1973
commit aff7a61bca
26 changed files with 1022 additions and 565 deletions
@@ -2,12 +2,9 @@ import { useTranslation } from 'react-i18next';
import { Select, SelectProps } from '/@/shared/components/select/select';
export interface YesNoSelectProps extends Omit<SelectProps, 'data' | 'onChange' | 'value'> {
onChange: (e?: boolean) => void;
value?: boolean;
}
export interface YesNoSelectProps extends SelectProps {}
export const YesNoSelect = ({ onChange, value, ...props }: YesNoSelectProps) => {
export const YesNoSelect = ({ ...props }: YesNoSelectProps) => {
const { t } = useTranslation();
return (
@@ -23,10 +20,6 @@ export const YesNoSelect = ({ onChange, value, ...props }: YesNoSelectProps) =>
value: 'true',
},
]}
onChange={(e) => {
onChange(e ? e === 'true' : undefined);
}}
value={value !== undefined ? value.toString() : null}
{...props}
/>
);