how to override nuxeo-document-suggestion query?

how to override nuxeo-document-suggestion query?, the widget configuration below is not working

<nuxeo-document-suggestion role="widget" value="{{document.properties.sopot:notario}}" label="Notaría" query="SELECT * FROM  Document WHERE dc:title ILIKE ?  and ecm:primaryType = 'dPreferencia'" ></nuxeo-document-suggestion>
0 votes

1 answers

1576 views

ANSWER



Hello,

You have to create a new page provider and make the suggestion element reuse this page provider in the “page-provider” attribute of the element.

Regards

1 votes



Do you have an example of how the <nuxeo-document-suggestion> element would look like when a custom "page-provider" is used?
08/27/2019

Something like : page provider called folderish-suggestions which is "ecm:primaryType IN ('Folder','Workspace') AND ecm:isTrashed = 0 AND ecm:isProxy = 0 AND ecm:isCheckedInVersion = 0 AND ecm:fulltext = '?*'" and the associated suggestion <nuxeo-document-suggestion label="Target folder" value="{{destination}}" page-provider="folderish-suggestions" min-chars="0" class="input"></nuxeo-document-suggestion>
08/27/2019