mirror of
https://github.com/strapi/strapi.git
synced 2025-12-29 16:16:20 +00:00
Remove Json from available filters
This commit is contained in:
parent
81a96bcc46
commit
eecccbcbd8
@ -63,12 +63,16 @@ class InputWithAutoFocus extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
InputWithAutoFocus.defaultProps = {
|
||||
filterToFocus: null,
|
||||
};
|
||||
|
||||
InputWithAutoFocus.propTypes = {
|
||||
filter: PropTypes.object.isRequired,
|
||||
filterToFocus: PropTypes.oneOfType([
|
||||
PropTypes.object,
|
||||
PropTypes.number,
|
||||
]).isRequired,
|
||||
]),
|
||||
index: PropTypes.number.isRequired,
|
||||
inputStyle: PropTypes.object.isRequired,
|
||||
name: PropTypes.string.isRequired,
|
||||
|
||||
@ -30,6 +30,9 @@ function FilterOptions({ filter, filterToFocus, index, onChange, onClickAdd, onC
|
||||
|
||||
// This component is needed in order to add the date icon inside the InputDate
|
||||
const Wrapper = get(schema, [filter.attr, 'type'], 'string') === 'date' ? InputWrapper : 'div';
|
||||
const selectOptionsSchema = Object
|
||||
.keys(schema)
|
||||
.filter(x => schema[x].type !== 'json');
|
||||
|
||||
return (
|
||||
<Div borderLeft={!showAddButton || get(filter, 'value', '') !== ''}>
|
||||
@ -38,7 +41,7 @@ function FilterOptions({ filter, filterToFocus, index, onChange, onClickAdd, onC
|
||||
onChange={onChange}
|
||||
name={`${index}.attr`}
|
||||
value={get(filter, 'attr', '')}
|
||||
selectOptions={Object.keys(schema)}
|
||||
selectOptions={selectOptionsSchema}
|
||||
style={selectStyle}
|
||||
/>
|
||||
<InputSelect
|
||||
|
||||
@ -18,5 +18,27 @@
|
||||
"appearance": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"attributes": {
|
||||
"string": {
|
||||
"appearance": ""
|
||||
},
|
||||
"int": {
|
||||
"appearance": ""
|
||||
},
|
||||
"float": {
|
||||
"appearance": ""
|
||||
},
|
||||
"decimal": {
|
||||
"appearance": ""
|
||||
},
|
||||
"date": {
|
||||
"appearance": ""
|
||||
},
|
||||
"json": {
|
||||
"appearance": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -40,4 +40,4 @@
|
||||
"configurable": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user