feat: association cascader support filter
This commit is contained in:
parent
436088d7b9
commit
e8497f8f8e
@ -18,14 +18,17 @@ const AssociationCascader = connect((props) => {
|
|||||||
const titleField = cm.getCollection(collection).titleField;
|
const titleField = cm.getCollection(collection).titleField;
|
||||||
const joinTitleField = cm.getCollection(collection + '.' + associationField).titleField;
|
const joinTitleField = cm.getCollection(collection + '.' + associationField).titleField;
|
||||||
|
|
||||||
const { data } = useRequest<any>({
|
const params = {
|
||||||
resource: collection,
|
|
||||||
action: 'list',
|
|
||||||
params: {
|
|
||||||
appends: [associationField],
|
appends: [associationField],
|
||||||
fields: [titleField],
|
fields: [titleField],
|
||||||
pageSize: 99999,
|
pageSize: 99999,
|
||||||
},
|
filter: props?.params?.filter ? { ...props?.params?.filter } : {},
|
||||||
|
};
|
||||||
|
|
||||||
|
const { data } = useRequest<any>({
|
||||||
|
resource: collection,
|
||||||
|
action: 'list',
|
||||||
|
params,
|
||||||
});
|
});
|
||||||
|
|
||||||
const options = useMemo(() => {
|
const options = useMemo(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user