mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:25:15 +00:00
parent
07b9ac0873
commit
c95889aec2
@ -76,6 +76,7 @@ export const Action: ComposedAction = observer((props: any) => {
|
||||
className,
|
||||
disabled,
|
||||
icon,
|
||||
title,
|
||||
...others
|
||||
} = props;
|
||||
const { onClick } = useProps(props);
|
||||
@ -113,7 +114,7 @@ export const Action: ComposedAction = observer((props: any) => {
|
||||
component={component || Button}
|
||||
className={classnames(className, actionDesignerCss)}
|
||||
>
|
||||
{compile(fieldSchema.title)}
|
||||
{title || compile(fieldSchema.title)}
|
||||
<Designer {...designerProps} />
|
||||
</SortableItem>
|
||||
);
|
||||
|
@ -83,7 +83,7 @@ export const FilterAction = observer((props: any) => {
|
||||
</form>
|
||||
}
|
||||
>
|
||||
<Action {...others} />
|
||||
<Action {...others} title={field.title} />
|
||||
</Popover>
|
||||
</FilterActionContext.Provider>
|
||||
);
|
||||
|
@ -103,7 +103,7 @@ export const useFilterActionProps = () => {
|
||||
const defaultFilter = removeNullCondition(props.params.filter);
|
||||
// filter parameter for the filter action
|
||||
const filter = removeNullCondition(values?.filter);
|
||||
service.run({ ...service.params?.[0], filter: mergeFilter(defaultFilter, filter) });
|
||||
service.run({ ...service.params?.[0], page: 1, filter: mergeFilter(defaultFilter, filter) });
|
||||
const items = filter?.$and || filter?.$or;
|
||||
if (items?.length) {
|
||||
field.title = t('{{count}} filter items', { count: items?.length || 0 });
|
||||
@ -113,7 +113,7 @@ export const useFilterActionProps = () => {
|
||||
},
|
||||
onReset() {
|
||||
const filter = removeNullCondition(props.params.filter);
|
||||
service.run({ ...service.params?.[0], filter });
|
||||
service.run({ ...service.params?.[0], filter, page: 1 });
|
||||
field.title = t('Filter');
|
||||
},
|
||||
};
|
||||
|
@ -72,7 +72,7 @@ export const TableBlockDesigner = () => {
|
||||
params.filter = filter;
|
||||
field.decoratorProps.params = params;
|
||||
fieldSchema['x-decorator-props']['params'] = params;
|
||||
service.run({ ...service.params?.[0], filter });
|
||||
service.run({ ...service.params?.[0], filter, page: 1 });
|
||||
dn.emit('patch', {
|
||||
schema: {
|
||||
['x-uid']: fieldSchema['x-uid'],
|
||||
@ -190,7 +190,7 @@ export const TableBlockDesigner = () => {
|
||||
params.pageSize = pageSize;
|
||||
field.decoratorProps.params = params;
|
||||
fieldSchema['x-decorator-props']['params'] = params;
|
||||
service.run({ ...service.params?.[0], pageSize });
|
||||
service.run({ ...service.params?.[0], pageSize, page: 1 });
|
||||
dn.emit('patch', {
|
||||
schema: {
|
||||
['x-uid']: fieldSchema['x-uid'],
|
||||
|
@ -57,7 +57,7 @@ export const TableSelectorDesigner = () => {
|
||||
params.filter = filter;
|
||||
field.decoratorProps.params = params;
|
||||
fieldSchema['x-decorator-props']['params'] = params;
|
||||
service.run({ ...service.params?.[0], filter });
|
||||
service.run({ ...service.params?.[0], filter, page: 1 });
|
||||
dn.emit('patch', {
|
||||
schema: {
|
||||
['x-uid']: fieldSchema['x-uid'],
|
||||
@ -175,7 +175,7 @@ export const TableSelectorDesigner = () => {
|
||||
params.pageSize = pageSize;
|
||||
field.decoratorProps.params = params;
|
||||
fieldSchema['x-decorator-props']['params'] = params;
|
||||
service.run({ ...service.params?.[0], pageSize });
|
||||
service.run({ ...service.params?.[0], pageSize, page: 1 });
|
||||
dn.emit('patch', {
|
||||
schema: {
|
||||
['x-uid']: fieldSchema['x-uid'],
|
||||
|
Loading…
Reference in New Issue
Block a user