Skip to content

Commit

Permalink
simplify edit_input_form
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Mar 15, 2024
1 parent d9ea7c5 commit 7295f0a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/edit-data-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ edit_input_form <- function(default = list(),
)
)
do.call(numericInput, opts)
} else if (isTRUE((inherits(variable, "factor")))) {
} else if (inherits(variable, "factor")) {
opts <- getOption("datamods.edit.input.factor", list())
opts <- modifyList(
x = opts,
Expand All @@ -154,7 +154,7 @@ edit_input_form <- function(default = list(),
)
)
do.call(virtualSelectInput, opts)
} else if (isTRUE((inherits(variable, "character")))) {
} else if (inherits(variable, "character")) {
opts <- getOption("datamods.edit.input.character", list())
opts <- modifyList(
x = opts,
Expand All @@ -166,7 +166,7 @@ edit_input_form <- function(default = list(),
)
)
do.call(textInput, opts)
} else if (isTRUE((inherits(variable, "logical")))) {
} else if (inherits(variable, "logical")) {
opts <- getOption("datamods.edit.input.logical", list())
opts <- modifyList(
x = opts,
Expand All @@ -180,7 +180,7 @@ edit_input_form <- function(default = list(),
)
)
do.call(prettyCheckbox, opts)
} else if (isTRUE((inherits(variable, "Date")))) {
} else if (inherits(variable, "Date")) {
opts <- getOption("datamods.edit.input.Date", list())
opts <- modifyList(
x = opts,
Expand All @@ -192,7 +192,7 @@ edit_input_form <- function(default = list(),
)
)
do.call(airDatepickerInput, opts)
} else if (isTRUE((inherits(variable, c("POSIXct", "POSIXt"))))) {
} else if (inherits(variable, c("POSIXct", "POSIXt"))) {
opts <- getOption("datamods.edit.input.POSIXt", list())
opts <- modifyList(
x = opts,
Expand Down

0 comments on commit 7295f0a

Please sign in to comment.