Code Monkey home page Code Monkey logo

Comments (8)

kdietrich avatar kdietrich commented on July 20, 2024

Use make_widget to add a widget to gridstack without creating the DOM element.

from dashboards.

parente avatar parente commented on July 20, 2024

gridstack/gridstack.js#264

from dashboards.

jhpedemonte avatar jhpedemonte commented on July 20, 2024

Using make_widget instead of add_widget will work, but there isn't yet a solution to destroy the Gridstack object without also destroying the DOM to which it is attached (see my comment here).

from dashboards.

parente avatar parente commented on July 20, 2024

OK. We'll keep tracking.

from dashboards.

jhpedemonte avatar jhpedemonte commented on July 20, 2024

Can't yet remove our destroy workaround. A different approach would be to disable Gridstack when we are not using it, then reuse existing Gridstack when going back to dashboard mode.

One issue is that this approach would complicate our code. For one, we would need to keep track of cells added in the Notebook mode. There were some other issues that I can't recall at the moment. That's why we went with the simpler implementation of destroying the Gridstack instance and recreating from scratch.

(Updated title to remove mention of add_widget)

from dashboards.

jhpedemonte avatar jhpedemonte commented on July 20, 2024

Opened PR #196 to track updating Gridstack to a version that doesn't require us to monkey patch destroy. However, I found there is still a bug when removing an individual cell -- see this discussion for more info.

from dashboards.

jhpedemonte avatar jhpedemonte commented on July 20, 2024

Gridstack cut an official 0.2.5. Some highlights (from quick perusal of commits):

Use with require.js

If you're using require.js and a single file jQueryUI please check out this
Stackoverflow question to get it
working properly.

from dashboards.

parente avatar parente commented on July 20, 2024

Grooming old issues ...

Gridstack 0.2.6 and up require jquery 3.1 and jquery-ui 1.12 (https://github.com/troolee/gridstack.js/releases/tag/v0.2.6). Notebook 5.0 is currently using to 2.0 and 1.10 respectively (https://github.com/jupyter/notebook/blob/5.0.0/bower.json#L12).

Trying to use gridstack 0.2.6 or 0.3.0 with what exists in notebook leads to undefined errors for the ui parameter in many gridstack callbacks, possibly caused by the version mismatch.

from dashboards.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.