Hello,
I am applying a filter to the data, which results in a new searchModel which my dataset uses. But regardless of how many rows are within the dataset, the height of the GridView remains the same as the original height (containing blank space below the filtered rows).
Here is my applyFilterWithText method in my datasource:
- (void)gridView:(IGGridView*)gridView applyFilterWithText:(NSString*)filterText
{
[self.data localSearchWithTerm: filterText ];
_footerView.text = [self titleForFooter];
[self.gridView reloadData];
[self.gridView invalidateIntrinsicContentSize];
}
So you can see that I am calling reloadData and invalidateIntrinsicContentSize, but that does not resize the grid after filtering the results.
I also tried overriding the heightForRowAtPath method like this, but it only gets called for the 2 filtered rows. The grid height is still the original height:
-(CGFloat)gridView:(IGGridView*)gridView heightForRowAtPath:(IGRowPath*)path
BOOL hasValue = [self.getData containsRowAtIndex:path.rowIndex];
if (hasValue)
return 46.0f;
return 0.0f;