Skip to content

Commit

Permalink
fix typing issue?
Browse files Browse the repository at this point in the history
  • Loading branch information
hansnowak authored and maartenbreddels committed Sep 27, 2023
1 parent afc8e47 commit 49c8418
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions solara/website/pages/api/confirmation_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
"""

from typing import Union

import solara
from solara.lab.components.confirmation_dialog import ConfirmationDialog
from solara.website.utils import apidoc

users = solara.reactive("Alice Bob Cindy Dirk Eve Fred".split())
user_to_be_deleted = solara.reactive(users.value[0])
user_to_be_deleted: solara.Reactive[Union[str, None]] = solara.reactive(users.value[0])
is_open = solara.reactive(False)


Expand All @@ -21,9 +23,9 @@ def delete_user():
if user_to_be_deleted.value:
users.set([u for u in users.value if u != user_to_be_deleted.value])
if users.value:
user_to_be_deleted.value = users.value[0]
user_to_be_deleted.set(users.value[0])
else:
user_to_be_deleted.value = None
user_to_be_deleted.set(None)


@solara.component
Expand Down

0 comments on commit 49c8418

Please sign in to comment.