Sfoglia il codice sorgente

get tag list elements

yusuketk 7 anni fa
parent
commit
6db67135bf
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7 0
      src/client/js/components/TagsList.jsx

+ 7 - 0
src/client/js/components/TagsList.jsx

@@ -11,6 +11,13 @@ export default class TagsList extends React.Component {
     };
   }
 
+  async componentWillMount() {
+    const res = await this.props.crowi.apiGet('/tags.list');
+    this.setState({
+      tags: res.tags,
+    });
+  }
+
   render() {
     return (
       <div>