Skip to content

Commit

Permalink
Misc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Aug 26, 2024
1 parent d5f8501 commit 09c414d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions panel/layout/modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@

import param

from pyviz_comms import JupyterComm

from ..io.resources import CDN_DIST
from ..models.layout import ModalDialogEvent
from ..models.modal import ModalDialogEvent
from ..util import lazy_load
from .base import ListPanel

if TYPE_CHECKING:
from bokeh.document import Document
from bokeh.model import Model
from pyviz_comms import Comm, JupyterComm
from pyviz_comms import Comm


class Modal(ListPanel):
Expand Down Expand Up @@ -48,6 +50,9 @@ def open(self):
def close(self):
self._send_event(ModalDialogEvent, open=False)

def toggle(self):
self.close() if self.is_open else self.open()

def _process_param_change(self, msg):
msg = super()._process_param_change(msg)
msg.pop("is_open", None)
Expand Down

0 comments on commit 09c414d

Please sign in to comment.