diff --git a/R/custom_SelectInput.R b/R/custom_SelectInput.R index 7a72fc4..d9da27b 100644 --- a/R/custom_SelectInput.R +++ b/R/custom_SelectInput.R @@ -31,16 +31,18 @@ columnSelectInput <- function(inputId, label, data, selected = "", ..., { "name": "%s", "label": "%s", + "dataclass": "%s", "datatype": "%s" }'), col, attr(datar()[[col]], "label") %||% "", - IDEAFilter:::get_dataFilter_class(datar()[[col]]) + IDEAFilter:::get_dataFilter_class(datar()[[col]]), + data_type(datar()[[col]]) ) }, col = names(datar())) if (!"none" %in% names(datar())){ - labels <- c("none"=list(sprintf('\n {\n \"name\": \"none\",\n \"label\": \"%s\",\n \"datatype\": \"\"\n }',none_label)),labels) + labels <- c("none"=list(sprintf('\n {\n \"name\": \"none\",\n \"label\": \"%s\",\n \"dataclass\": \"\",\n \"datatype\": \"\"\n }',none_label)),labels) choices <- setNames(names(labels), labels) choices <- choices[match(if (length(col_subsetr()) == 0 || isTRUE(col_subsetr() == "")) names(datar()) else col_subsetr(), choices)] } else { @@ -62,7 +64,10 @@ columnSelectInput <- function(inputId, label, data, selected = "", ..., return '
' +
+ ' ' +
+ item.data.dataclass +
+ '
' + ' ' +
+ ' ' +
item.data.datatype +
'
' +
'