Skip to content

Commit

Permalink
fix(admin): page do not refresh after any DB update
Browse files Browse the repository at this point in the history
The UI of this page depended on `constantsReactive()` which cause the
page to refresh automatically if they were any change on the DB (quite
annoying). This commit remove this dependence.
  • Loading branch information
juliendiot42 committed Jul 30, 2024
1 parent ae7bee1 commit d2d21aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ui/ui_admin_loggedIn.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,12 @@ if (gameInitialised()) {
style = "display: inline-block;
vertical-align: top;",
numericInput("admin_const_initialBudget", "Initial budget (relative to phenotyping plot)",
value = constantsReactive()$initialBudget / constantsReactive()$cost.pheno.field,
# value = constantsReactive()$initialBudget / constantsReactive()$cost.pheno.field,
value = 3900,
# NOTE / TODO: while it may be better to set the default value to the
# current initial budget, using constantsReactive() here cause this
# "admin" page to rerender if any modification is made to the DB, and
# then to show the default tab which is annoying.
min = 0,
max = NA,
step = 100
Expand Down

0 comments on commit d2d21aa

Please sign in to comment.