AnswerDotAI / AnswerDotAI/MonsterUI

When using the `LabelSelect()` inside a `Modal()`, selection dismisses the modal.

Open
#164 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
522
Forks
33
Avg merge
1m
Merged PRs (30d)
1

Description

When using the `LabelSelect()` inside a `Modal()`, selection of an option from the drop down list appears to dismiss the modal. This appears to be a UI issue only - there doesn't appear to be any server calls on selection.

```
def get_user_modal(session):
return Modal(
Form(
LabelInput("First Name", id="first_name"),
LabelInput("Last Name", id="last_name"),
LabelSelect(
Option("Primary User", "primary_user"),
Option("Secondary User", "secondary_user"),
id="user_type"
),
cls="space-y-4",
),
header=ModalTitle("Add New User"),
footer=ModalFooter(
ModalCloseButton(),
),
hx_open=True,
uk_modal="bg-close: false; esc-close: false; stack: true; bg-close-esc: false"
)
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the provided get_user_modal example with LabelSelect inside Modal and observe the selection interaction. Trace the LabelSelect and Modal entry points to identify why choosing an option dismisses the modal; done means the option changes without closing the modal or triggering an unintended server call.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.