Skip to content

Conversation

@Marwolaeth
Copy link

@Marwolaeth Marwolaeth commented Aug 28, 2025

The var_multiline argument of edit_data_server() allows users to specify character columns that should use multi-line text inputs (textAreaInput), which is useful for longer text fields like descriptions, comments, or articles.

For example, in a research database, you might have a 'notes' column with detailed observations. With this feature, you can easily configure that column to use a multi-line input instead of a single-line text field. As for me, I really miss this option in my current work. I looked at different ways to add this feature and decided to use an explicit function argument.

However, I struggled to develop any tests for this feature.

I'd appreciate your review and feedback. Thank you for your continued work on this excellent and useful package

data <- as.data.table(data)
data_rv$colnames <- copy(colnames(data))
if (!is.null(var_multiline)) {
var_multiline <- intersect(var_multiline, var_edit)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly unnecessary

data_rv$colnames <- copy(colnames(data))
if (!is.null(var_multiline)) {
var_multiline <- intersect(var_multiline, var_edit)
var_multiline <- var_multiline[sapply(data[, var_multiline, with = FALSE], is.character)]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option is to use conditional within conditional in edit_input_form when the variable is character

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant