Просмотр исходного кода

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 лет назад
Родитель
Сommit
4a2ea72ffc
1 измененных файлов с 6 добавлено и 1 удалено
  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.hide = this.hide.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.handleChangeLinkInput = this.handleChangeLinkInput.bind(this);
     this.handleSelecteLinkerType = this.handleSelecteLinkerType.bind(this);
@@ -132,6 +132,11 @@ class LinkEditModal extends React.PureComponent {
     this.setState({ markdown });
   }
 
+  handleChangeTypeahead(selected) {
+    const page = selected[0];
+    this.setState({ linkInputValue: page.path });
+  }
+
   handleChangeLabelInput(label) {
     this.setState({ labelInputValue: label });
   }