Bug in new table when reordering columns with dynamic columns and server-side pagination

I'm experiencing unusual behavior with a server-side paginated table that includes both static and dynamic columns. Here's what happens consistently after I reorder any column:

  1. Two empty columns get added for each dynamic column – one at the start, another at the end, and sometimes even in between.
  2. These empty columns overlap with the existing columns visually.
  3. It's challenging to remove these blank columns; trying to delete them in the sidebar either doesn't work or can add even more columns. Best way is to remove all dynamic columns.
  4. As I scroll horizontally across the table, these empty columns remain static and cover the regular, moving columns.

Reordering functions correctly without the dynamic columns. Has anyone else faced a similar issue?

After reordering a column (with three dynamic columns in the table)

This is what the sidebar looks like

Hello @devdee ,

Thank you for sharing your question.

This sounds a lot like a known issue pertaining to server-side pagination for tables. Various factors like the version of Retool you're using can affect this, but it might also occur due to incorrect configurations in your queries or table settings.

There are a few troubleshooting steps you can take:

  1. Check your data fetching and count queries to ensure they're correctly configured to align with the table’s ‘sortedColumn’ and 'sortedDesc' properties.
  2. Verify that server-side pagination has been correctly enabled in the Advanced Settings section of the Table component.
  3. If you're using dynamic columns, check that the 'key' value in dynamic columns settings matches the corresponding value in your data.

If the issue persists after these checks, it might be more specific to your setup or may be a limitation within Retool's current version. We are aware of this issue and we are actively working on improving the table component.

-Brett

Hey there Brett,

Thanks for the advice! I've played around with the first point a bit and made sure server-side pagination is enabled as per your second suggestion. However, I'm still running into the issue.

Regarding the 'key' value in dynamic columns that you mentioned, I'm not quite clear on what that entails. Could you please provide a bit more detail or an example of how to properly set this up? It might be the missing piece in solving my problem. Otherwise, I'll hope that you guys will resolve it in a future version.

Looking forward to your guidance!

Server-side pagination is enabled
Bildschirmfoto 2023-11-30 um 11.47.09

How to check the 'key' value?

Hi @devdee ,

I'm sorry I don't have a perfect solution for you based on the information that you have provided - however I did want to send over a simple working example of server-side pagination from my own Demo instance.

Here is a brief video: Loom | Free Screen & Video Recording Software | Loom

Have you setup yours in the same way?

-Brett

1 Like

Hello Brett,

Amazing work on the video, thanks a lot! Everything's running smoothly with the fixed columns for me as well. However, I'm encountering issues when rearranging dynamic columns. Seems like I might need to hold out for some bug fixes from the Retool team.

Hi @devdee ,

When you say 'dynamic' columns - are your referring to their 'Editable' nature or something else? I want to ensure I properly understand you when you refer to them as Dynamic and maybe I can help/test further.

-Brett

Hi Brett,

With dynamic columns I am referring to the setting "use dynamic column settings" in the table element

Thanks @devdee ,

With those settings enabled for my tables, I'm not able to reproduce this error. I will report the bug - I appreciate your patience and engagement.

-Brett

Hey @brettp , I am having the same issue reported by @devdee . The issue is when trying to rearrange dynamic columns in the table itself. That is, if you try and drag a column in the table to the left or right, you see the issues reported in the original post, with ghost columns created in the table and they also show up in the side bar as new columns.

Rearranging columns works as expected when not using dynamic columns, but with dynamic columns enabled, doing so effectively breaks the table.

Thanks for chiming in @drewski! We are tracking reports of this bug, but still haven't been able to ship a fix yet. I'll post here when I get any updates internally