|
@@ -82,6 +82,7 @@ class TagsInput extends React.Component {
|
|
|
options={this.state.resultTags} // Search result (Some tag names)
|
|
options={this.state.resultTags} // Search result (Some tag names)
|
|
|
placeholder="tag name"
|
|
placeholder="tag name"
|
|
|
selectHintOnEnter
|
|
selectHintOnEnter
|
|
|
|
|
+ autoFocus={this.props.autoFocus}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|
|
@@ -95,13 +96,15 @@ class TagsInput extends React.Component {
|
|
|
const TagsInputWrapper = withUnstatedContainers(TagsInput, [AppContainer]);
|
|
const TagsInputWrapper = withUnstatedContainers(TagsInput, [AppContainer]);
|
|
|
|
|
|
|
|
TagsInput.propTypes = {
|
|
TagsInput.propTypes = {
|
|
|
- appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
|
|
|
|
|
+ appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
|
|
|
|
|
|
- tags: PropTypes.array.isRequired,
|
|
|
|
|
|
|
+ tags: PropTypes.array.isRequired,
|
|
|
onTagsUpdated: PropTypes.func.isRequired,
|
|
onTagsUpdated: PropTypes.func.isRequired,
|
|
|
|
|
+ autoFocus: PropTypes.bool,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
TagsInput.defaultProps = {
|
|
TagsInput.defaultProps = {
|
|
|
|
|
+ autoFocus: false,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export default TagsInputWrapper;
|
|
export default TagsInputWrapper;
|