Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
filter and sort
filterElements(filter, e) {
FilterSortActions.filter(filter);
}
sortElements(sort, e) {
FilterSortActions.sort(sort);
}
renderLoadButtons() {
return _.map(loadData, d => <Button key={d.name} active={this.props.type == d.value} onClick={ElementActions.loadElements.bind(this, d.value)}>{d.name}</Button>, this)
}
renderFilterButtons() {
return _.map(filterData, d => <Button key={d.name} active={this.props.filter == d.value} onClick={this.filterElements.bind(this, d.value)}>{d.name}</Button>, this)
}
renderSortButtons() {
return _.map(sortData, d => <Button key={d.name} active={this.props.sort == d.value} onClick={this.sortElements.bind(this, d.value)}>{d.name}</Button>, this)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment