Hello,
I am attempting to filter a boolean column in a datagrid called 'Inactive' with a switch component. The desired outcome is when the switch is set to false only false values will be displayed in the datagrid but when it is set to true both true and false values will be displayed.
I created a property on page load called ShowInactive and set it to false.
I then created a switch component called InactiveSwitch and set its value to ${ShowInactive}.
I then set the FilterValue of the Inactive column to ${ShowInactive || false}, the FilterProperty to Inactive and the LogicalFilterOperator to Or.
The page loads as expected, displaying only false values and when I click the filter icon it displays the intended filtering.
But when I activate the switch, the filtering displayed when selecting the filter icon is updated but the changes do not take effect until I deactivate the switch.
Activated:
Deactivated:
As shown, the filter dropdown displays the correct and intended filtering, but the datagrid is only displaying true or false but never both as the filtering dropdown suggests.
So my two questions are:
- Is there something I can do to make the datagrid reflect the filtering set by the switch immediately without having to execute the switch again?
- How do I make the datagrid filter as intended and the way it is shown when I select the filter icon?
Thanks,
Zach