]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/page-picker.js
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / resources / js / components / page-picker.js
index 9bb0bee04a3fb6be13e798d01352e0b59b6fa2bf..5ab51159570350f00a31abdf5fb581923a1a42cd 100644 (file)
@@ -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',
         });
     }