Closed mwouts closed 2 years ago
Apparently we'll have to create a widget for using itables in Jupyter Lab. An example on how to develop a new widget is available at https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Custom.html (the example only works in the classical notebook).
A small fix for JupyterLab.
Cell to add at the beginning of the notebook in JupyterLab
from IPython.display import HTML, display
from time import sleep
display(HTML("""
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
"""))
sleep(0.1)
import itables.interactive
Thank you @fcollonval for the code snippet, much appreciated!
the snipped stopped working unfortunately, I am getting a following error an empty table and a following error in the console:
I have added a mention of the workaround in the README. From the version 0.3.1 on, jquery
is loaded by itables
, so the workaround can be reduced to this:
from IPython.display import HTML, display
from time import sleep
display(HTML("""
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
"""))
sleep(0.1)
@jkochel , I have also changed the way we use jquery. May I ask you to give a try to the new version 0.3.1 and report if the problem that you had in September with version 0.3.0 is still present? Thanks
This has been solved in itables==0.4.0
(to be released soon)
In Jupyter lab, importing
itables
yields an error: Javascript Error: require is not defined.