NXP-14640: fix document library gadget pagination when the number of results is unknown