You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have following widgets which represents categories form the data in the table: enter image description here
The flow is when a user clicks on one of the widgets the table should show data of that category only.
So far I have implemented following:
const columns = [
{
....
dataField: "Category",
formatter: formatCategory,
text: "Category",
sort: true,
filter: textFilter({
getFilter: (filter) => {
// nameFilter was assigned once the component has been mounted.
categoryFilter = filter;
}
})
....
}
Handle Clicking Event on Button and Passing the category:
const handleWidgetClick = (category) => {
categoryFilter = category;
// When I am doing something like this I am getting Uncaught Error
// categoryFilter is not a Function
categoryFilter(category)
};
@hirocsingh , you're overriding your categoryFilter function when you do categoryFilter = category. It's no longer a function but a string instead (assuming this is what you're passing when you click on the button).
I have following widgets which represents categories form the data in the table: enter image description here
The flow is when a user clicks on one of the widgets the table should show data of that category only.
So far I have implemented following:
Handle Clicking Event on Button and Passing the category:
I have followed example from here
I am not sure what/where I am doing something wrong. Please guide me through it, Thanks
The text was updated successfully, but these errors were encountered: