fix: correct data loading
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
init_val = function(scheme, ns) {
|
||||
|
||||
options(box.path = here::here())
|
||||
box::use(modules/data_manipulations[check_for_empty_data])
|
||||
box::use(modules/data_manipulations[is_this_empty_value])
|
||||
|
||||
iv <- shinyvalidate::InputValidator$new()
|
||||
|
||||
@@ -15,7 +15,7 @@ init_val = function(scheme, ns) {
|
||||
|
||||
# формируем список id - тип
|
||||
inputs_simple_list <- scheme |>
|
||||
dplyr::filter(!form_type %in% c("nested_forms","description", "description_header")) |>
|
||||
dplyr::filter(!form_type %in% c("nested_forms", "description", "description_header")) |>
|
||||
dplyr::distinct(form_id, form_type) |>
|
||||
tibble::deframe()
|
||||
|
||||
@@ -39,7 +39,7 @@ init_val = function(scheme, ns) {
|
||||
|
||||
iv$add_rule(x_input_id, function(x) {
|
||||
# exit if empty
|
||||
if (check_for_empty_data(x)) {
|
||||
if (is_this_empty_value(x)) {
|
||||
return(NULL)
|
||||
}
|
||||
# хак для пропуска значений
|
||||
@@ -64,7 +64,7 @@ init_val = function(scheme, ns) {
|
||||
function(x) {
|
||||
|
||||
# exit if empty
|
||||
if (check_for_empty_data(x)) {
|
||||
if (is_this_empty_value(x)) {
|
||||
return(NULL)
|
||||
}
|
||||
|
||||
@@ -85,11 +85,11 @@ init_val = function(scheme, ns) {
|
||||
}
|
||||
}
|
||||
|
||||
if (form_type %in% c("select_multiple", "select_one")) {
|
||||
if (form_type %in% c("select_multiple", "select_one", "radio", "checkbox")) {
|
||||
iv$add_rule(x_input_id, function(x) {
|
||||
|
||||
if (length(x) == 1) {
|
||||
if (check_for_empty_data(x)) return(NULL)
|
||||
if (is_this_empty_value(x)) return(NULL)
|
||||
}
|
||||
|
||||
# проверка на соответствие вариантов схеме ---------
|
||||
|
||||
Reference in New Issue
Block a user