Our app is using the filters plugin. Inside the afterFilter hook, I want to get the number of visible rows in the table, but the values returned are wrong and indeterministic.
After I filter the rows, often the number of rows before filtering is returned, when I filter to 0 rows, then the new value is returned - 0. Sometimes I can obtain the correct new number of rows, but it’s very rare.
It seems like a race condition to me.
The methods I tried using: countVisibleRows(), countRenderedRows().
Am I doing something wrong?