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