a!gridField() pagination issue

Hello,

I am using a!gridField() with  'data' as datasubset,  'columns' , 'pagingSaveInto' and 'emptyGridMessage' defined into it.  Data comes in chunks from the external end point (using API).

My page contains filter section and grid section. First time when page loads it all works fin. Issue comes when I change the gird to next page(s) and then after I add a filter criteria into it in such a way that I do not find any record ( i.e. no data items to show after filter ) and hit "apply" button. Error comes like below:

"Expression evaluation error in rule 'xxx' at function a!gridField: A grid component [label=“”] has an invalid value for “value” and “totalCount”. “startIndex” must not be greater than “totalCount”, but “startIndex” was 21 and “totalCount” was 0."

"All variables" of the "grid field interface" are the rule inputs (ri! variables) and its values are getting updated in  apply button's saveinto event. However the gridField is still using the old pagination values and throws error. 

This rule is already inside the with() block.

  Discussion posts and replies are publicly visible