table.selectRow() causes rows to disappear

I have an event handler on a table's get query which selects the row that was just created or edited. Whenever this happens, all the rows except for the bottom two turn blank; the space for them is still there, but the values and row borders are gone. I've attached a screenshot of this. Do you have any suggestions?

Hey @sethd12345! Ack that shouldn’t be happening, let me try to repro now

1 Like

Would it be possible for me to step into your app to take a look? If so, feel free to DM a link to your app :slight_smile: Or do you have any screenshots of your setup (namely, your event handler to select the newly created row)?

I haven't been able to reproduce the same issue just yet :thinking:

Following up from DM's (thank you for sharing your app!) for anyone else who might be following along, it seems related to the table being scrollable.

Switching the table from scroll to pagination seems to fix things.

But this is definitely a bug and I'll work to repro on my end so I can submit the bug report!

Inserting a row into a scrollable table is still working for me :thinking:

Aha! I tracked it down to the event handler that's setting your selected row after your GetBoxes query runs.

Your event handler:

Once I changed the code to not use the temporary state variable (LastEditedBoxID.value) and am just grabbing the last id returned by your GetBoxes query (which I believe should also be the last added or updated box anyway), it seems to work! :slight_smile:

How does this work for you now?

That part seems to work well! I'm now running into an issue where the top few rows of the table are blank on page load, and only appear after scrolling the table for the first time. Screenshot attached:

Eesh. I’ll step in and take a look! Will update you with my findings

It seems to be related to the selectedRow being at the bottom of the field of view of the scrollable table.

I made your table a wee bit shorter and the table seems to be properly scrolling down to display the selectedRow (which we've set to be the last box returned from GetBoxes)!

You should be able to make the table taller if you'd like, but there seems to be some un-ideal height that causes the white space :bug: