Bug - Custom Column button does not select row before new page is opened

When you click a custom column of Button type, the row is selected. Good.

But if your onClick event is set to Open another Retool Page, the page is launched before the row is selected. So if you are passing a value from table.selectedRow as a hash to the new page you are launching, you do not get the expected result.

Here, I have selected a row with a project_id of 6:

Now I click the button on a row with a project_id of 2:

Here is the page that launches: retool.com/editor/735f77fe-4019-11ed-bca5-3f59b703b3da/Admin_SingleProject#ProjectID=6

It passed a project_id of 6.

Hi @bradlymathews!

I'm seeing the same thing spinning up a set of example apps, I'll make sure that's documented on our side. Interestingly, adding the exact same configuration as a table action seems to pass in the expected row value just fine :thinking:

-Justin

Finally getting back to this app. I added it as a table Action. I cannot put it in the column order I want, but it will work for now.

I remember there being a Select Row on Click option and I could not find it. I see now that is is part of the Actions settings and it only shows up if you create an action. I guess what we need is a similar prop for button column types. Or just have it default to that.

I was able to fix this same issue by using currentRow instead of selectedRow in the URL parameters.