I have an endpoint looking like this
@GetMapping("/page") Page<Event> getEventPage( @PageableDefault(page = 0, size = 20) @SortDefault(sort = "createdDateTime", direction = Sort.Direction.DESC) Pageable pageable)
How am I supposed to pass the Pageable object from my React frontend using Axios, I got this so far:
fetchEvents(pageable) {
return axios.get("http://localhost:8080/api/events/page", pageable, this.setupAxiosInterceptors());
}
Where pageable
is the last fetched page. Now it just resorts to the default values.