Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fix tags not working #4070

Merged
merged 1 commit into from
Jan 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions js/src/ui/Actionbar/Search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ export default class ActionbarSearch extends Component {
key='searchAccount'>
<div className={ inputContainerClasses.join(' ') }>
<InputChip
addOnBlur
className={ styles.input }
hint='Enter search input...'
ref='inputChip'
tokens={ tokens }

onBlur={ this.handleSearchBlur }
onInputChange={ this.handleInputChange }
onTokensChange={ this.handleTokensChange }

addOnBlur
/>
</div>

Expand Down Expand Up @@ -118,6 +118,10 @@ export default class ActionbarSearch extends Component {
handleSearchClick = () => {
const { showSearch } = this.state;

if (!showSearch) {
this.refs.inputChip.focus();
}

this.handleOpenSearch(!showSearch);
}

Expand Down
15 changes: 8 additions & 7 deletions js/src/ui/Actionbar/actionbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@
}

.toolbuttons {
}
overflow: hidden;

.toolbuttons button {
margin: 10px 0 10px 16px !important;
color: white !important;
}
button {
margin: 10px 0 10px 16px !important;
color: white !important;
}

.toolbuttons svg {
fill: white !important;
svg {
fill: white !important;
}
}
4 changes: 4 additions & 0 deletions js/src/ui/Form/InputChip/inputChip.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ export default class InputChip extends Component {
.filter(v => v !== value));

this.handleTokensChange(newTokens);
this.focus();
}

focus = () => {
this.refs.chipInput.focus();
}

Expand Down
4 changes: 2 additions & 2 deletions js/src/views/Accounts/List/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ class List extends Component {
const tags = account.meta.tags || [];
const name = account.name || '';

const values = []
.concat(tags, name)
const values = tags
.concat(name)
.map(v => v.toLowerCase());

return searchValues
Expand Down