X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/2081a783f3795f300defea0ba2285fdc7d80f512..refs/heads/development:/resources/js/components/page-picker.js diff --git a/resources/js/components/page-picker.js b/resources/js/components/page-picker.js index 9bb0bee04..5ab511595 100644 --- a/resources/js/components/page-picker.js +++ b/resources/js/components/page-picker.js @@ -14,6 +14,8 @@ export class PagePicker extends Component { this.defaultDisplay = this.$refs.defaultDisplay; this.buttonSep = this.$refs.buttonSeperator; + this.selectorEndpoint = this.$opts.selectorEndpoint; + this.value = this.input.value; this.setupListeners(); } @@ -33,6 +35,11 @@ export class PagePicker extends Component { const selectorPopup = window.$components.first('entity-selector-popup'); selectorPopup.show(entity => { this.setValue(entity.id, entity.name); + }, { + initialValue: '', + searchEndpoint: this.selectorEndpoint, + entityTypes: 'page', + entityPermission: 'view', }); }