-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44d11c2
commit ca5fe90
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -892,17 +892,38 @@ updateF7SmartSelect <- function(inputId, selected = NULL, choices = NULL, multip | |
session$sendInputMessage(inputId, message) | ||
} | ||
|
||
#' Input layout default options | ||
#' | ||
#' @keywords internal | ||
inputLayoutDefaults <- function() { | ||
list( | ||
media = NULL, | ||
description = NULL, | ||
floating = FALSE, | ||
outline = FALSE, | ||
clearable = TRUE | ||
) | ||
} | ||
|
||
#' Create common input layout | ||
#' | ||
#' See \url{https://framework7.io/docs/inputs#inputs-layout}. | ||
#' | ||
#' @importFrom utils modifyList | ||
#' | ||
#' @keywords internal | ||
createInputLayout <- function( | ||
..., label = NULL, style, dropdown = FALSE) { | ||
|
||
if (style$floating && is.null(label)) { | ||
stop("floating can't be used when label is NULL") | ||
} | ||
|
||
# make sure style does contain all defaults | ||
# this prevents an error when the users only provides | ||
# a subset of the style options | ||
style <- modifyList(inputLayoutDefaults(), style) | ||
|
||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
hypebright
Author
Contributor
|
||
item <- f7ListItem( | ||
media = style$media, # icon | ||
title = label # label | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Thanks for adding this. I wanted to point this out but you read in my mind :)