-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Rating] [dispose()
method throws an error]
#2006
Comments
dispose()
method throws an error]
Unfortunately this is a bug. I'm adding this issue to our project to-fix list. Thank you for letting us know |
This was referenced May 29, 2024
This was referenced Jun 29, 2024
This was referenced Jul 29, 2024
This was referenced Aug 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
![image](https://private-user-images.githubusercontent.com/55406009/275572322-229ad737-31c2-440b-ba10-d6846543d3d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTY4NDUsIm5iZiI6MTczOTU5NjU0NSwicGF0aCI6Ii81NTQwNjAwOS8yNzU1NzIzMjItMjI5YWQ3MzctMzFjMi00NDBiLWJhMTAtZDY4NDY1NDNkM2Q1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA1MTU0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThhNzQ2MWNhMmZjZWU0YjQyYmRiY2M2ZjFkMDZjNDg5NmUwYTVkNjdhZGQ4MDkzNjBjYWIyNzRlNjljNDQwN2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.rDn4LsbIWsEYifbjY_3LluiBZ6e6m6jUiG6nItNo0AI)
I have an instance of the Rating component. When I call dispose(), the error occurs:
Show your code
There is an Internal server error when I try to add a playgound, so this is my code:
import { Rating, initTE } from "tw-elements";
initTE({ Rating });
const diffRatingEl = document.getElementById('difficulty-rating');
let diffRating = new Rating(diffRatingEl);
diffRating.dispose();
Desktop (please complete the following information):
Additional context
I looked up the code of rating in
node_modules\tw-elements\dist\src\js\components\rating.js
:this._icons.removeAttribute("tabIndex");
this._icons prop is supposed to be an array, so it's obvious that removeAttribute() is not a function, instead we should run this on every icon:
this._icons.forEach(el => el.removeAttribute("tabIndex"));
The text was updated successfully, but these errors were encountered: