Created
January 6, 2016 17:59
-
-
Save engineersamuel/d4b3494ead3598fb6e08 to your computer and use it in GitHub Desktop.
filter and sort
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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