Skip to content

Commit

Permalink
Fetch 1000 terms at a time, ordered by usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nylen committed Jun 28, 2016
1 parent b9798de commit 0532210
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/post-editor/term-token-field/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ class TermTokenField extends React.Component {
render() {
const termNames = ( this.props.terms || [] ).map( term => term.name );

const query = {
number: 1000,
order_by: 'count',
order: 'DESC'
};

return (
<label className="editor-drawer__label">
<span className="editor-drawer__label-text">
Expand All @@ -71,6 +77,7 @@ class TermTokenField extends React.Component {
<QueryTerms
siteId={ this.props.siteId }
taxonomy={ this.props.taxonomyName }
query={ query }
/>
<TokenField
value={ this.getPostTerms() }
Expand Down

0 comments on commit 0532210

Please sign in to comment.