Filter table with Server-side pagination enabled

Hi,

I noticed that when I enable server-side pagination, with the type set to "Limit offset Based", the filter icon on the table is no longer available. I would still like the default filter functionality that comes with the table with server-side pagination enabled. Is that currently possible with the Table component, or do I have to build my custom filter for this purpose?

4 Likes

You have to build your own custom filters -- our filtering UI doesn't currently support server-side paginated tables unfortunately!

I'd like to use default filters too!
It's so basic function

1 Like

Is there any chance this has changed or is being worked on?

We've found for tables with more than a few thousand records they crash the user's browser, so we need to enable pageination.

However, that removes filtering which was one of the main selling points of Retool. Are there any docs or resources on building our own custom filters?

1 Like

It really depends on what you want to filter. You can pull that dataset into javascript and manipulate it any way you want.

I have a search bar set up on one of my tables like this.

const options = {
  includeScore: true,
  minMatchCharLength: true,
  threshold: 0.2,
  keys: ['projectName','city', 'customerName']
}

const fuse = new Fuse(localProjects.value, options)

const result = fuse.search(textInput1.value)


const finalArray = result.map(function (obj) {
  return obj.item;
});

if (textInput1.value === '' || null) {
  return(localProjects.value)
} else {
  return(finalArray)
}

This is using an additional library from cdnjs "https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.6.2/fuse.js" you have to add into the scripts and styles settings on retool.