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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃 warningbox is shown if multi classes dropdown is changed #5290

Closed
hasan-sh opened this issue Mar 21, 2024 · 7 comments 路 Fixed by #5438
Closed

馃 warningbox is shown if multi classes dropdown is changed #5290

hasan-sh opened this issue Mar 21, 2024 · 7 comments 路 Fixed by #5438
Assignees
Labels
bug Something isn't working

Comments

@hasan-sh
Copy link
Collaborator

Describe the bug
image

image

@jpelay ?!

@hasan-sh hasan-sh added the bug Something isn't working label Mar 21, 2024
@jpelay
Copy link
Member

jpelay commented Mar 21, 2024

@jpelay ?!

I was checking all of the HTML elements that had aria-selected=True and now that this page has two selects, it got messed up 馃槅

@jpelay
Copy link
Member

jpelay commented Mar 21, 2024

So this is what happened: since (as far as I know) there's no way to target the id of the div tw-elements generates when displaying the selects, I targeted all of the elements that had this field: '[data-te-select-option-ref]'. Since now there are two of these selects in the page, my selector targets the first one and now the event handler is messed up. I made a question in the GitHub page of the library, but if you have any ideas as to how to do this, they'll be more than welcomed!!

@hasan-sh
Copy link
Collaborator Author

hasan-sh commented Mar 25, 2024

Yeah, for now we could just make the selectors more specific. Perhaps by adding a div with an id as a wrapper to the select element we want your event to listen to:) Could you share the link to your question on their github page?

@jpelay
Copy link
Member

jpelay commented Mar 25, 2024

Yeah, for now we could just make the selectors more specific. Perhaps by adding a div with an id as a wrapper to the select element we want your event to listen to:) Could you share the link to your question on their github page?

Here it is: mdbootstrap/TW-Elements#2333 They told me to check the API page of the element, but to even view the documentation I need a paid account. I honestly think the best way forward would be to replace this library for a free one, or maybe even our own solution, because we can't even use many of the features with a free account :C

@hasan-sh
Copy link
Collaborator Author

hasan-sh commented Mar 25, 2024

Yeah, for now we could just make the selectors more specific. Perhaps by adding a div with an id as a wrapper to the select element we want your event to listen to:) Could you share the link to your question on their github page?

Here it is: mdbootstrap/TW-Elements#2333 They told me to check the API page of the element, but to even view the documentation I need a paid account. I honestly think the best way forward would be to replace this library for a free one, or maybe even our own solution, because we can't even use many of the features with a free account :C

It was free when i used it. Really annoying that it isn't now! Let's discuss it tomorrow! But i think the solution i suggested would solve our problem for now!

@jpelay
Copy link
Member

jpelay commented Mar 25, 2024

It was free when i used it. Really annoying that it isn't now! Let's discuss it tomorrow! But i think the solution i suggested would solve our problem for now!

TW Elements generates the dropdown dynamically, so there's no way to target it externally, I tried multiple things to no avail. The div that actually changes has an id that is generated at runtime. Tomorrow we can keep discussing this!

@hasan-sh
Copy link
Collaborator Author

@jpelay check out this related comment by @Felienne #5385 (review)

@Annelein Annelein removed their assignment Apr 22, 2024
@mergify mergify bot closed this as completed in #5438 May 6, 2024
mergify bot pushed a commit that referenced this issue May 6, 2024
The current dropdowns are part of a paid library and therefore are very hard to target in JS. Replace them with Hasan's select to  be able to have control over them.

Fixes #5290


**How to test**

Customizing an adventure should work normally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants