Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onSearchChange = ({ value }) => {
if (this.props.mentionSearchAsync !== undefined) {
/* async */
this.props.mentionSearchAsync(value)
.then((data) => { this.setState({suggestions: fromJS(data.suggestions)}) })
} else {
/* static list of users */
this.setState({
suggestions: defaultSuggestionsFilter(value, this.props.mentions),
})
}
}
this.onSearchChange = ({value}) => {
this.setState({
suggestions: defaultSuggestionsFilter(value, suggestions)
});
};
// formatters
this.onSearchChangeFormatter = ({value}) => {
this.setState({
suggestionsFormatter: defaultSuggestionsFilter(value, suggestionsFormatter)
});
};
// selectors
onMentionSearchChange = ({ value }) => {
this.setState({
suggestions: defaultSuggestionsFilter(value, mentions),
});
};
const onSearchChange = ({ value }) => {
setSuggestions(defaultSuggestionsFilter(value, normalizedData() || []));
};
render() {
return (
<div>
{
this.editor = element;
}}
/>
</div>
);
}
}
this.onSearchChangeSelector = ({value}) => {
this.setState({
suggestionsSelector: defaultSuggestionsFilter(value, suggestionsSelector)
});
};
onSearchChange = ({ value }) => {
this.setState({
suggestions: defaultSuggestionsFilter(value, mentions),
});
};
onSearchChange = ({ value }) => {
this.setState({
suggestions: defaultSuggestionsFilter(value, mentions),
});
};
onMentionSearchChange = ({ value }) => {
this.setState({
suggestions: defaultSuggestionsFilter(value, mentions),
});
};