update read/writeonly filter rule to be able to filter both

This commit is contained in:
Dimitar Nanov 2018-11-14 16:12:42 +02:00 committed by Roman Hotsiy
parent 5addc21cd8
commit a8f70377ab
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -34,9 +34,9 @@ export class ObjectSchema extends React.Component<ObjectSchemaProps> {
const filteredFields = needFilter const filteredFields = needFilter
? fields.filter(item => { ? fields.filter(item => {
return ( return !(
(this.props.skipReadOnly && !item.schema.readOnly) || (this.props.skipReadOnly && item.schema.readOnly) ||
(this.props.skipWriteOnly && !item.schema.writeOnly) (this.props.skipWriteOnly && item.schema.writeOnly)
); );
}) })
: fields; : fields;