Skip to content

Commit

Permalink
Fix Icon not being DOMWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Fleming committed Jan 31, 2024
1 parent 9711add commit 8f173ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions examples/generic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@
"metadata": {},
"outputs": [],
"source": [
"import ipylab\n",
"import ipywidgets as ipw\n",
"\n",
"import ipylab\n",
"\n",
"app = ipylab.JupyterFrontEnd()"
]
},
Expand Down Expand Up @@ -315,7 +317,7 @@
}
],
"source": [
"widget = ipw.HTML('<h3>Hello world</h3>')\n",
"widget = ipw.HTML(\"<h3>Hello world</h3>\")\n",
"widget"
]
},
Expand Down Expand Up @@ -374,7 +376,7 @@
"metadata": {},
"outputs": [],
"source": [
"t = app.getAttribute('views', widget=widget)"
"t = app.getAttribute(\"views\", widget=widget)"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions ipylab/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import asyncio

import ipywidgets as ipw
from ipywidgets import Box, Layout, register, widget_serialization
from ipywidgets import Box, DOMWidget, Layout, register, widget_serialization
from ipywidgets.widgets.trait_types import InstanceDict
from traitlets import Bool, Dict, Unicode

Expand All @@ -17,7 +17,7 @@


@register
class Icon(WidgetBase):
class Icon(DOMWidget, WidgetBase):
_model_name = Unicode("IconModel").tag(sync=True)
_view_name = Unicode("IconView").tag(sync=True)

Expand Down

0 comments on commit 8f173ab

Please sign in to comment.