Browse Source

Merge branch 'feat/enable-update-link-with-link-editor-modal' into feat/replace-perma-link

# Conflicts:
#	src/client/js/components/PageEditor/LinkEditModal.jsx
yusuketk 5 years ago
parent
commit
4a2ea72ffc
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/client/js/components/PageEditor/LinkEditModal.jsx

+ 6 - 1
src/client/js/components/PageEditor/LinkEditModal.jsx

@@ -42,7 +42,7 @@ class LinkEditModal extends React.PureComponent {
     this.show = this.show.bind(this);
     this.show = this.show.bind(this);
     this.hide = this.hide.bind(this);
     this.hide = this.hide.bind(this);
     this.cancel = this.cancel.bind(this);
     this.cancel = this.cancel.bind(this);
-    this.handleChangeLinkInput = this.handleChangeLinkInput.bind(this);
+    this.handleChangeTypeahead = this.handleChangeTypeahead.bind(this);
     this.handleChangeLabelInput = this.handleChangeLabelInput.bind(this);
     this.handleChangeLabelInput = this.handleChangeLabelInput.bind(this);
     this.handleChangeLinkInput = this.handleChangeLinkInput.bind(this);
     this.handleChangeLinkInput = this.handleChangeLinkInput.bind(this);
     this.handleSelecteLinkerType = this.handleSelecteLinkerType.bind(this);
     this.handleSelecteLinkerType = this.handleSelecteLinkerType.bind(this);
@@ -132,6 +132,11 @@ class LinkEditModal extends React.PureComponent {
     this.setState({ markdown });
     this.setState({ markdown });
   }
   }
 
 
+  handleChangeTypeahead(selected) {
+    const page = selected[0];
+    this.setState({ linkInputValue: page.path });
+  }
+
   handleChangeLabelInput(label) {
   handleChangeLabelInput(label) {
     this.setState({ labelInputValue: label });
     this.setState({ labelInputValue: label });
   }
   }