Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Rating] [dispose() method throws an error] #2006

Closed
Assignees
Trochonovitz
Labels
Milestone
@Nikitossik

Description

@Nikitossik

Describe the bug
I have an instance of the Rating component. When I call dispose(), the error occurs:
image

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):

  • OS: Windows
  • Browser: Chrome
  • Version: 118.0.5993.70

Additional context
I looked up the code of rating innode_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"));

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp