Skip to content

Commit

Permalink
Chrome: Disable the tags input when loading
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jun 5, 2017
1 parent 8f20d1d commit bbb9eaf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
5 changes: 0 additions & 5 deletions editor/sidebar/post-taxonomies/style.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.editor-post-taxonomies__tags-selector {
margin-top: 10px;

.spinner {
float: none;
margin: 0;
}
}
20 changes: 9 additions & 11 deletions editor/sidebar/post-taxonomies/tags-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { unescape, find } from 'lodash';
* WordPress dependencies
*/
import { Component } from 'element';
import { Spinner, FormTokenField } from 'components';
import { FormTokenField } from 'components';
import { getEditedPostAttribute } from '../../selectors';
import { editPost } from '../../actions';

Expand Down Expand Up @@ -102,16 +102,14 @@ class TagsSelector extends Component {

return (
<div className="editor-post-taxonomies__tags-selector">
{ loading && <Spinner /> }
{ ! loading &&
<FormTokenField
value={ selectedTags }
displayTransform={ unescape }
suggestions={ tagNames }
onChange={ this.onTagsChange }
maxSuggestions={ MAX_TERMS_SUGGESTIONS }
/>
}
<FormTokenField
value={ selectedTags }
displayTransform={ unescape }
suggestions={ tagNames }
onChange={ this.onTagsChange }
maxSuggestions={ MAX_TERMS_SUGGESTIONS }
disabled={ loading }
/>
</div>
);
}
Expand Down

0 comments on commit bbb9eaf

Please sign in to comment.