refactor: adjust the markdown field to use the input component in filtering (#4899)

This commit is contained in:
Katherine
2024-07-18 23:25:13 +08:00
committed by GitHub
parent b25bc369d4
commit a39df74a49
4 changed files with 22 additions and 6 deletions
@@ -79,6 +79,6 @@ export class MarkdownFieldInterface extends CollectionFieldInterface {
};
}
filterable = {
operators: operators.string,
operators: operators.bigField,
};
}
@@ -184,7 +184,7 @@ export const collection = [
{ label: '{{t("is not empty")}}', value: '$notEmpty', noValue: true },
];
export const richText = [
export const bigField = [
{
label: '{{t("contains")}}',
value: '$includes',
@@ -218,6 +218,22 @@ export const richText = [
'x-component': 'Input',
},
},
{ label: '{{t("is empty")}}', value: '$empty', noValue: true },
{ label: '{{t("is not empty")}}', value: '$notEmpty', noValue: true },
{
label: '{{t("is empty")}}',
value: '$empty',
noValue: true,
schema: {
type: 'string',
'x-component': 'Input',
},
},
{
label: '{{t("is not empty")}}',
value: '$notEmpty',
noValue: true,
schema: {
type: 'string',
'x-component': 'Input',
},
},
];
@@ -79,6 +79,6 @@ export class RichTextFieldInterface extends CollectionFieldInterface {
};
};
filterable = {
operators: operators.richText,
operators: operators.bigField,
};
}
@@ -109,7 +109,7 @@ export class MarkdownVditorFieldInterface extends CollectionFieldInterface {
}
}
filterable = {
operators: operators.number,
operators: operators.bigField,
};
titleUsable = true;
}