Skip to content

Commit

Permalink
fix: filter issue with chips on DocumentList (#827)
Browse files Browse the repository at this point in the history
* RM#87963
  • Loading branch information
vhu-axelor authored and lme-axelor committed Dec 17, 2024
1 parent d6c33ab commit 25f26e2
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions packages/apps/dms/src/api/document-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,31 @@ const createDocumentCriteria = ({
if (Array.isArray(extensions) && extensions.length > 0) {
criteria.push({
operator: 'or',
criteria: extensions.map(_extension => ({
fieldName: 'fileName',
operator: 'like',
value: '%.' + _extension,
})),
criteria: [
{
operator: 'and',
criteria: [
{
fieldName: 'isDirectory',
operator: '=',
value: false,
},
{
operator: 'or',
criteria: extensions.map(_extension => ({
fieldName: 'fileName',
operator: 'like',
value: '%.' + _extension,
})),
},
],
},
{
fieldName: 'isDirectory',
operator: '=',
value: true,
},
],
});
}

Expand Down

0 comments on commit 25f26e2

Please sign in to comment.