fin-hypergrid / fin-hypergrid/core

No way of temporarily displaying a grid and removing it, as clean up isn't implemented

Open
#629 4 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
JavaScript
Stars
907
Forks
139
PR merge metrics
No merged PRs in 30d

Description

Hi,

Thanks for a great library! :-) I've created some proof-of-concepts at work using the older version.

Right now I'm looking to open a "widget" (terrible name I know) that contains a grid. The user can close the widget. Therefore, it needs to have its resources cleaned up.

`grid.stopPaintThread()` and `grid.stopResizeThread()` are not hooked up correctly and throw.

I can call `grid.canvas.stopPaintLoop()` successfully to stop hooking into `requestAnimationFrame` instead.

However, there is currently no way to remove the `document` level events that the canvas hooks up. This causes exceptions to be thrown once the element containing the div is removed from the page.

See: https://github.com/fin-hypergrid/core/blob/master/src/lib/Canvas.js#L53

Contributor guide

Open the contributing guide

Research direction

Start with src/lib/Canvas.js at line 53 and trace the document-level events attached by the canvas, along with grid.stopPaintThread(), grid.stopResizeThread(), and canvas.stopPaintLoop(). The work is done when a grid can be closed, its resources and document listeners are cleaned up, and removing its containing element no longer causes exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.