feat: more filters component
This commit is contained in:
@@ -356,6 +356,7 @@ export default (props: any) => {
|
||||
<ProLayout
|
||||
fixSiderbar
|
||||
fixedHeader={false}
|
||||
headerRender={false}
|
||||
breadcrumbRender={false}
|
||||
route={route}
|
||||
location={location}
|
||||
|
||||
@@ -4,13 +4,13 @@ import pillButtonCss from './styles.less';
|
||||
|
||||
type Option = {
|
||||
label: string;
|
||||
value: string | number;
|
||||
value: string | number | null;
|
||||
icon?: React.ReactNode;
|
||||
};
|
||||
|
||||
type Props = {
|
||||
value?: string | number;
|
||||
onChange?: (value: string | number | undefined) => void;
|
||||
onChange?: (value: string | number | undefined | null) => void;
|
||||
options: Option[];
|
||||
disabled?: boolean;
|
||||
variant?: 'filled' | 'outlined' | 'solid';
|
||||
|
||||
@@ -81,14 +81,6 @@ const FilterFormContent: React.FC<FilterFormContentProps> = ({
|
||||
})}
|
||||
>
|
||||
<PillButtonGroup
|
||||
allowClear
|
||||
showSearch={false}
|
||||
placeholder={intl.formatMessage({
|
||||
id: 'models.filter.category'
|
||||
})}
|
||||
size="large"
|
||||
maxTagCount={1}
|
||||
variant="filled"
|
||||
options={modelCategories.filter((item) => item.value)}
|
||||
></PillButtonGroup>
|
||||
</Form.Item>
|
||||
@@ -105,18 +97,7 @@ const FilterFormContent: React.FC<FilterFormContentProps> = ({
|
||||
id: 'common.filter.status'
|
||||
})}
|
||||
>
|
||||
<PillButtonGroup
|
||||
allowClear
|
||||
showSearch={false}
|
||||
placeholder={intl.formatMessage({
|
||||
id: 'common.filter.status'
|
||||
})}
|
||||
size="large"
|
||||
maxTagCount={1}
|
||||
optionRender={optionRender}
|
||||
labelRender={labelRender}
|
||||
options={statusOptions}
|
||||
></PillButtonGroup>
|
||||
<PillButtonGroup options={statusOptions}></PillButtonGroup>
|
||||
</Form.Item>
|
||||
</Content>
|
||||
</FilterForm>
|
||||
|
||||
Reference in New Issue
Block a user