Describe the bug
I want to be able to page through a table. But the parameters to get the table are changing so the parameters to the constructor of the loader are 'stale'. I am using a state management library that re-renders the component when the parameters change. So I re-constructed the loader on the OnParametersSetAsync Blazor lifecycle hook. when I do that I get a null reference exception that seems to come from rendering the table.
To Reproduce
Please create a standalone Page which reproduces the issue and paste the code here in a code block.
There are three standalone components involved. The main component looks like
Removing the <Table> from the component lets me run without a null reference exception. If other words changing the razor to this removes the null reference exception
@using BlazorTable
<h3>Breakpoint Grouping</h3>
<h4>Standards</h4>
@BreakpointStandardCmp
<h4>Groups</h4>
@BreakpointGroupPickerCmp
@if (string.IsNullOrWhiteSpace(Props.Standard.Bpstandard) ||
string.IsNullOrWhiteSpace(Props.Group.BpgroupName))
{
<h3> Standard or Group not selected</h3>
}
else
{
<h3>Organisms NOT in this group @Props.Standard.BpstandardId, @Props.Group.BpgroupId</h3>
}
@if (string.IsNullOrWhiteSpace(Props.Standard.Bpstandard) ||
string.IsNullOrWhiteSpace(Props.Group.BpgroupName))
{
<h3> Standard or Group not selected</h3>
}
else
{
<h3>Organisms in this group @Props.Standard.BpstandardId, @Props.Group.BpgroupId</h3>
}
Here is the stacktrace if it is helpful:
Expected behavior
I expect the tables to be rendered without an exception.
Describe the bug I want to be able to page through a table. But the parameters to get the table are changing so the parameters to the constructor of the loader are 'stale'. I am using a state management library that re-renders the component when the parameters change. So I re-constructed the loader on the OnParametersSetAsync Blazor lifecycle hook. when I do that I get a null reference exception that seems to come from rendering the table.
To Reproduce Please create a standalone Page which reproduces the issue and paste the code here in a code block.
There are three standalone components involved. The main component looks like
With the applicable code behind
Removing the
<Table>
from the component lets me run without a null reference exception. If other words changing the razor to this removes the null reference exceptionHere is the stacktrace if it is helpful:
Expected behavior I expect the tables to be rendered without an exception.