mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 18:32:41 +00:00
allow strings for filterOn
This commit is contained in:
@@ -84,8 +84,7 @@ const Combobox = createClass({
|
||||
if(!this.state.showDropdown) return null;
|
||||
if(this.props.autoSuggest && !this.state.inputFocused){
|
||||
const suggestMethod = this.props.autoSuggest.suggestMethod;
|
||||
const filterOn = this.props.autoSuggest.filterOn;
|
||||
|
||||
const filterOn = _.isString(this.props.autoSuggest.filterOn) ? [this.props.autoSuggest.filterOn] : this.props.autoSuggest.filterOn;
|
||||
const filteredArrays = filterOn.map((attr)=>{
|
||||
const children = dropdownChildren.filter((item)=>{
|
||||
if(suggestMethod === 'includes'){
|
||||
|
||||
@@ -247,7 +247,8 @@ const MetadataEditor = createClass({
|
||||
suggestMethod : 'startsWith',
|
||||
clearAutoSuggestOnClick : true,
|
||||
filterOn : ['data-value', 'data-detail', 'title']
|
||||
}}>
|
||||
}}
|
||||
>
|
||||
</Combobox>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user