mirror of
https://github.com/we-promise/sure.git
synced 2026-04-08 23:04:49 +00:00
Fix event handler removal on disconnect (#540)
* Fix event handler removal on disconnect * Fix tab controller
This commit is contained in:
@@ -8,14 +8,14 @@ export default class extends Controller {
|
||||
|
||||
connect() {
|
||||
this.renderChart(this.seriesValue);
|
||||
document.addEventListener("turbo:load", this.renderChart.bind(this));
|
||||
document.addEventListener("turbo:load", this.renderChart);
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
document.removeEventListener("turbo:load", this.renderChart.bind(this));
|
||||
document.removeEventListener("turbo:load", this.renderChart);
|
||||
}
|
||||
|
||||
renderChart() {
|
||||
renderChart = () => {
|
||||
this.drawChart(this.seriesValue);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user