The Grid with Cascading Combos sample is currently configured to show only 3 records in the grid. The sample works as expected, however, it is not adapted to real-life scenarios, where developers will most likely bind datasets having greater number of records. The sample involves some code that is error-prone when the grid virtualization kicks in.
For example, this issue was recently logged by a user adopting the sample's approach in their own app. While the PRs linked to the issue will address the encountered error when more records are bound, there is still room for improvement in the following areas:
The first column's ("Country") cell value should be bound to the templated igx-combo value, otherwise selected value for a record would be displayed for the reused combo of the same column when scrolling the grid, because of virtualization.
There is some logic that show/hides linear progress bars in the cells templates by programmatically altering css styles. This is nested within a setTimeout callback, which can lead to unexpected errors in a virtualized grid.
The initially disabled combos for the second two columns ("Region" and "City") appear to have a selected item (there is the "Clear selection" button), because the cell value is an empty string '', which is a valid item for selection in the igx-simple-combo. Binding to undefined instead could be considered, so that the combo is properly displayed.
Steps to reproduce
Check out the linked sample and issue
Result
Described above
Expected result
The sample could still display only 3 records, however, it should be adapted for larger data scenarios.
Description
The Grid with Cascading Combos sample is currently configured to show only 3 records in the grid. The sample works as expected, however, it is not adapted to real-life scenarios, where developers will most likely bind datasets having greater number of records. The sample involves some code that is error-prone when the grid virtualization kicks in. For example, this issue was recently logged by a user adopting the sample's approach in their own app. While the PRs linked to the issue will address the encountered error when more records are bound, there is still room for improvement in the following areas:
igx-combo
value, otherwise selected value for a record would be displayed for the reused combo of the same column when scrolling the grid, because of virtualization.setTimeout
callback, which can lead to unexpected errors in a virtualized grid.''
, which is a valid item for selection in theigx-simple-combo
. Binding toundefined
instead could be considered, so that the combo is properly displayed.Steps to reproduce
Result
Described above
Expected result
The sample could still display only 3 records, however, it should be adapted for larger data scenarios.
Attachments