themesberg / themesberg/flowbite
Dropdown in a Table contains stale data from Row 1
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 9.4k
- Forks
- 862
- PR merge metrics
- No merged PRs in 30d
Description
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
- screenshot of application with the dropdown disabled, notice that the data in the action column matches the id in the first column
- 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
-
dropdown-disabled
Dropdown is disabled. Showing all the data. The data is accurate. -
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Flowbite table dropdown in the reported Phoenix Framework 1.7 and LiveView 0.18 context, using the screenshots and browser details as references. Trace how the dropdown displays the row id when different rows are clicked; done means the clicked row consistently displays its own id in Firefox, Chrome, and Edge.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tailwindcss
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100