infima icon indicating copy to clipboard operation
infima copied to clipboard

Clickable dropdown not opening

Open yiliansource opened this issue 3 years ago • 3 comments

Currently, when attempting to open the clickable dropdowns, no dropdown appears.

yiliansource avatar Apr 22 '21 15:04 yiliansource

I may be wrong, but I think since the eventlistener is associated with vanilla elements this isn't propagated to the virtual DOM elements(created by React), so we might need to create a component and use the onClick event to apply the expected CSS.

fanny avatar Oct 19 '21 15:10 fanny

Has there been any movement on this? The clickable dropdowns are still not responding.

patdavid avatar Dec 07 '23 16:12 patdavid

Hello, the linked doc page shows purely static markup. It doesn't attach any JS code. If you want to make it functional, you would need to call the dropdown function yourself, as exemplified here: https://github.com/facebookincubator/infima/blob/79b4f86e4d161a8a61205ab0bc4676f97460f9ae/packages/core/demo/index.html#L3033C9-L3041C12

You can test it out-of-the-box here: https://infima.dev/demo/#dropdown

We are keeping it open because it's still worthwhile to fix our doc page and make it less confusing. We are not interested in running that script on a page already using React and we'd rather show a native React integration, as Docusaurus itself employs.

Josh-Cena avatar Dec 07 '23 22:12 Josh-Cena