yusuketk 7 lat temu
rodzic
commit
909f533376
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 1 1
      src/client/js/app.js
  2. 2 2
      src/client/js/components/PageTagForm.jsx

+ 1 - 1
src/client/js/app.js

@@ -303,11 +303,11 @@ const componentMappings = {
 if (pageId) {
   componentMappings['page-comments-list'] = <PageComments pageId={pageId} revisionId={pageRevisionId} revisionCreatedAt={pageRevisionCreatedAt} crowi={crowi} crowiOriginRenderer={crowiRenderer} />;
   componentMappings['page-attachment'] = <PageAttachment pageId={pageId} markdown={markdown} crowi={crowi} />;
+  // componentMappings['page-tag'] = <PageTagForm crowi={crowi} defaultPageTags={currentPageTags} handleSubmit={getNewPageTags} />; // [pagetag]
 }
 if (pagePath) {
   componentMappings['page'] = <Page crowi={crowi} crowiRenderer={crowiRenderer} markdown={markdown} pagePath={pagePath} showHeadEditButton={true} onSaveWithShortcut={saveWithShortcut} />;
   componentMappings['revision-path'] = <RevisionPath pagePath={pagePath} crowi={crowi} />;
-  // componentMappings['page-tag'] = <PageTagForm crowi={crowi} pageTags={currentPageTags} handleSubmit={getNewPageTags} />; // [pagetag]
   componentMappings['revision-url'] = <RevisionUrl pageId={pageId} pagePath={pagePath} />;
 }
 

+ 2 - 2
src/client/js/components/PageTagForm.jsx

@@ -36,7 +36,7 @@ export default class PageTagForm extends React.Component {
         <AsyncTypeahead
           allowNew={true}
           caseSensitive={false}
-          defaultSelected={this.props.pageTags}
+          defaultSelected={this.props.defaultPageTags}
           emptyLabel={''}
           isLoading={this.state.isLoading}
           minLength={1}
@@ -66,7 +66,7 @@ export default class PageTagForm extends React.Component {
 
 PageTagForm.propTypes = {
   crowi: PropTypes.object.isRequired,
-  pageTags: PropTypes.array,
+  defaultpageTags: PropTypes.array,
   handleSubmit: PropTypes.func,
 };