前端项目实战肆佰肆拾壹react-admin和material ui-增加过滤条件
 <List filters={postFilters} empty={<Empty />} disableAuthentication={false} actions={<CreateListActions productId={productId} solutionname={solutionname} isCreating={isCreating} handleCreate={handleCreate} />} filter={!productId ? {} : { po_id: productId }} exporter={false} hasCreate={true} resource="t_lps_po_detail"
                >
                    <Datagrid rowClick={'expand'} expandSingle={true} expand={StepEdit}>
                        <ReferenceField source="po_id" reference="t_lps_product_order" label="生产单" />
                        <ReferenceField source="color" reference="t_prod_color" label="颜色" />
                        <ReferenceField source="size" reference="t_prod_size" label="尺码" />
                        <TextField source='count' label="数量" />
                        <TextField source='description' label="描述" />
                    </Datagrid>
                </List>const postFilters = [
    <ReferenceInput variant='outlined' source="color" reference="t_prod_color" label='颜色'/>,
    <ReferenceInput variant='outlined' source="size" reference="t_prod_size" label='尺码'/>,
    <TextInput label="数量" source="count" />,
    <TextInput label="描述" source="size" />,
];运行结果
 

 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号