mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 07:33:17 +00:00
fix: fix issue #19532
This commit is contained in:
parent
a8ca9546b7
commit
48671c244d
@ -66,10 +66,7 @@ export const REVIEW_WORKFLOW_FILTERS = [
|
||||
type: 'relation',
|
||||
mainField: {
|
||||
name: 'name',
|
||||
|
||||
schema: {
|
||||
type: 'string',
|
||||
},
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
|
||||
@ -90,10 +87,7 @@ export const REVIEW_WORKFLOW_FILTERS = [
|
||||
type: 'relation',
|
||||
mainField: {
|
||||
name: 'id',
|
||||
|
||||
schema: {
|
||||
type: 'integer',
|
||||
},
|
||||
type: 'integer',
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@ -111,8 +111,7 @@ const AttributeTag = ({ attribute, filter, onClick, operator, value }: Attribute
|
||||
|
||||
const { fieldSchema } = attribute;
|
||||
|
||||
const type =
|
||||
fieldSchema.type === 'relation' ? fieldSchema?.mainField?.schema?.type : fieldSchema.type;
|
||||
const type = fieldSchema.type === 'relation' ? fieldSchema?.mainField?.type : fieldSchema.type;
|
||||
|
||||
let formattedValue = value;
|
||||
|
||||
|
||||
@ -344,8 +344,8 @@ const DefaultInputs = ({
|
||||
const getFilterList = (filterSchema: FilterData['fieldSchema']): Operator[] => {
|
||||
let type = filterSchema.type;
|
||||
|
||||
if (filterSchema.type === 'relation' && filterSchema?.mainField?.schema?.type) {
|
||||
type = filterSchema.mainField.schema.type;
|
||||
if (filterSchema.type === 'relation' && filterSchema?.mainField?.type) {
|
||||
type = filterSchema.mainField.type;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
|
||||
@ -50,7 +50,7 @@ describe('FilterListURLQuery', () => {
|
||||
type: 'relation',
|
||||
mainField: {
|
||||
name: 'postal_code',
|
||||
schema: { type: 'string', pluginOptions: { i18n: { localized: true } } },
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -61,7 +61,7 @@ export interface FilterData {
|
||||
options?: string[];
|
||||
mainField?: {
|
||||
name: string;
|
||||
schema?: Attribute.Any;
|
||||
type?: Attribute.Any['type'];
|
||||
};
|
||||
};
|
||||
trackedEvent?: TrackingEvent;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user