themesberg / themesberg/flowbite

passing in arguments to modal event handlers

Open
#644 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
9.4k
Forks
862
PR merge metrics
No merged PRs in 30d

Description

using flowbite's modal using javascript

onclick="modal.show(546)"

  onShow: (index) => {
      console.log('modal is shown for index = ' + index);
  },

index is showing as [Object] which is the modal element.

https://gist.github.com/anjanesh/c77423bfc7cdc31f391ca81a76a11ac3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior shown in the issue and linked gist, focusing on the modal.show(546) call and the onShow callback. Trace how the callback argument is selected; done means the value 546 reaches the handler instead of the modal element.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.