Hello,
I need help with performing a dynamic sorting and filtering with my Meteor Application using React.
What i have is a react component:
class DocumentList extends Component {
sortHandler(sortField, sortDirection){
// sorting codes here. will be executed when columns is clicked.
}
render(){
//Render list of document here
}
}
export default withTracker(()=>{
Meteor.subscribe('documents');
return{
documents
}
})(DocumentList)
Is there a way I can hookup the sortHandler so I can “re-subscribe” to and get a new data sorted according to what the user set (sort name ascending, sort name descending)
Thanks a lot