Hi Anusha,
I had this problem many times, with the list view,
so I implimented a workaround,
https://link.medium.com/JlhbuHhJpub
I've explained everything in this blog,
Works very well, so if you want you can follow this way also.
Hope it helps!