Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown in a Table contains stale data from Row 1 #566

Open
mudspot opened this issue May 27, 2023 · 0 comments
Open

Dropdown in a Table contains stale data from Row 1 #566

mudspot opened this issue May 27, 2023 · 0 comments

Comments

@mudspot
Copy link

mudspot commented May 27, 2023

Describe the bug
I have a Flowbite table generated using Phoenix Framework. A for-loop is used to enumerate against a data collection.
The last column of the table is a -dropdown-toggle. The dropdown contains an element showing the id of the current row.

However, when any of the dropdown is clicked, the id of the first row is always displayed.

Included in this report are

  1. screenshot of application with the dropdown disabled, notice that the data in the action column matches the id in the first column
  2. screenshot of application with dropdown enabled, and the third row clicked, notice that the id of the action column is now that of the first row, and not that of the current row.

Expected behavior
When the dropdown is clicked, the id of the current row should be displayed.

Screenshots

  1. dropdown-disabled
    Dropdown is disabled. Showing all the data. The data is accurate.

  2. dropdown-bug
    Dropdown is active. Shows the dropdown from the 3rd row.
    Notice the data in the first column and the 2nd column are now different.
    Also notice that the data in the 2 column is now the same as the first row's

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Tested on Latest Version of Firefox, Chrome, Edge

Additional context

  • Phoenix Framework 1.7
  • Live View 0.18

1 dropdown-disabled
2 dropdown-bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant