瀏覽代碼

query move top of list

yusuketk 7 年之前
父節點
當前提交
882f5d808c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/client/js/components/PageTagForm.jsx

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

@@ -49,7 +49,7 @@ export default class PageTagForm extends React.Component {
           onSearch={async query => {
             this.setState({ isLoading: true });
             const res = await this.crowi.apiGet('/tags.search', { q: query });
-            res.tags.push(query); // selectable query
+            res.tags.unshift(query); // selectable query
             this.setState({
               resultTags: Array.from(new Set(res.tags)), // use Set for de-duplication
               isLoading: false,