rx.button color disapper when page reload
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start by running the example app and reproducing the color loss after an F5 reload and after returning from the result page. Inspect the index() entry point, especially the rx.button and rx.alert_dialog in the rx.box; done means the Submit button retains its lightblue background in both navigation paths.
Written by the indexing model from the issue text.
Description
[Status]
the example code - 'quiz'
In 'index' class, there's a declaration of a 'box' used to place the 'Submit' button,
I've assigned a color "lightblue" to this button and add a alertdialog on it.
However,
- when the page is reloaded (F5), the "lightblue" is displayed briefly and then disappears
- returned back to this page from result page , button not display "lightblue".
But other buttons in the alertdialog displayed color correctly.
Please let me know where I might have gone wrong?
[Code]
below is the code of index():
def index():
"""The main view."""
return rx.center(
rx.vstack(
header(),
question1(),
question2(),
question3(),
rx.box(
rx.button(
"Submit",
bg="lightblue",
color="black",
width="6em",
padding="1em",
on_click=State.alertdialogchange,
),
rx.alert_dialog(
#setting of alert_dialog
),
),
spacing="1em",
),
padding_y="2em",
height="100vh",
align_items="top",
bg="#ededed",
overflow="auto",
)
- Dominant language
- Python
- Stars
- 576
- Forks
- 362
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reflex-dev/reflex-examples
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
reflex-dev/reflex-examples#177 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
reflex-dev/reflex-examples#296 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
reflex-dev/reflex-examples#247 ·
-
counter example: why response is slow, when click really fast, the counter takes seconds to catch up Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
reflex-dev/reflex-examples#181 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
reflex-dev/reflex-examples#162 ·
All issues in reflex-dev/reflex-examples
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100