DropDown stuck on last selected status - bug

DropDown Component is not updating with Default Value when new selectRows is done.
DropDown Default Value is: {{ sw_multipe_items.value ? '' : list_items.selectedRow.StatusID }}

Form data key: blank

I have Table listing information from our SQL DataBase
Table source: Get_Task

I have a dropdown listing statuses from out SQL database
Mappet with: Get_Status

I have a button (update)
trigger:

  • Post_Status
  • Get_Task (update table data after update / change)

If user Select status Finish then press Update button and then select next row in the table.

The Status Dropdown is showing "Finish" and not updated with Default Value for the new Selected Row. It looks like it then is stuck on last selected status "Finish" in the DropDown for any selected rows in Table.

Is this a Bug that the DropDown selected value is not refresh. how can I solve this so DropDown list always shows the value for selected row?

Selfhosted ver 3.114.3

Hi @Thore,

After updating the selected row in the table, could you try resetting the Dropdown component so it reverts to its default value?

Also, could you please share screenshots of your Retool table’s inspector settings, the Dropdown component’s inspector, and the related queries you’re using? That would help us get a clearer picture of your setup.

Thanks!

1 Like

Hi @WidleStudioLLP

I will tray to explain the process and added some screenshots:

I'm not sure how to reset the dropdown value to default after Update button is pressed.
I'm not any good with JS. I do not know if this will work as a event on the update button?

How my App is working:

  1. User select a Project in table: Project

  2. User is presented with Tasks in table: "list_items" example:

  3. User Select a item in table
    User can also turn on multiple-selection with a switch
    image

  4. Form components is showing data using Default value

{{ sw_multipe_items.value ? '' : list_items.selectedRow.WorkflowStatusID }}
  1. User select Status in DropDown
  2. Press Update Button. and event handlers:
  3. Update query:

    Note that this triggers reload of data in table "list_items"
  4. User select next item in the table "list_items"

Expected result: Dropdown shows status from the new selected row in table: list_items.

Instead it shows last selection in the DropDown.

Screenshots:
Work area: Table and Form:


Table inspector:

DropDown


DropDown inspector:

Update Button Handler

Update query


Note that this triggers reload of data in table "list_items"

Hi @Thore,

You're almost there! To display the selected row's status in a Select component — and use a fallback if the status is missing — follow these steps:


1. Add an Event Handler to the Table

  • Go to your table component.
  • Add an "on row click" event handler.
  • Use it to pass the selected row's data (especially the status field) to the Select component.

This ensures the Select component gets updated every time a user selects a row.


2. Set a Default Value in the Select Component

  • In the Select component’s "Default Value" field, use the following expression:
{{ table1.selectedRow.status || self.data[0].value }}
  • This expression means:
    • If the selected row has a status, it will be shown.
    • If the status is missing (null or undefined), the Select will show a fallback value — for example, the first option in the list (self.data[0].value) or a custom string like "Pending".