mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 04:50:12 +02:00
fix list filters
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user