dropZoneInput: Create a Dragula dropzone input

Description Usage Arguments See Also Examples

View source: R/dragulaSelect.R

Description

Create a Dragula dropzone input

Usage

1
2
3
4
5
6
dropZoneInput(inputId, choices, presets = NULL, hidden = FALSE,
  placeholder = NULL, highlight = FALSE, multivalued = FALSE,
  selectable = FALSE, selectOnDrop = FALSE, togglevis = FALSE,
  togglelock = FALSE, removeOnSpill = TRUE, direction = "vertical",
  maxInput = Inf, replaceOnDrop = FALSE, flex = FALSE,
  server = NULL, ...)

Arguments

inputId

The input slot that will be used to acces the value.

choices

List of acceptable values with their associated labels. Note that the labels can be arbitrary HTML, as long as they are wrapped in a tagList.

presets

Array or list of preset values.

hidden

Should the selected items be hidden? This is useful to represent a reactive or event trigger.

placeholder

Insert placeholder text.

highlight

Highlights the container on dragover. Useful when hidden is active.

multivalued

Allow multiple items with the same value?

selectable

Are the items in this dropzone selectable? Default is false. Use Shiny input input$<inputId>_selected to access selected items.

selectOnDrop

Should new dropped items be automatically selected?

togglevis

Add an icon to allow toggling items between visible/invisible. Default is false. Use Shiny input input$<inputId>_invisible to access invisible items.

togglelock

Add an icon to allow toggling items between locked/unlocked. Locked items are not draggable. Default is false. Use Shiny input input$<inputId>_locked to access locked items.

removeOnSpill

Remove items when dragged outside dropzone? Default is true.

direction

Direction (horizontal or vertical) to consider when determining where an element would be dropped. Default is vertical.

maxInput

Maximum allowable dropped items.

replaceOnDrop

Replace item on drop when at maximum allowable items?

flex

Use flex container for dropzone. Items are set to wrap, and flex direction is given by the direction argument (defaults to vertical).

server

Function or function name as a string that will be used for server-side creation of UI for dropzone items. This is needed only when the dropzone items contain Shiny inputs and/or outputs. You must also include the dropZoneServer function in the server portion of your Shiny app.

...

Additional arguments passed along to tags$div, such as class

See Also

dragulaSelectR

Examples

1
2
3
4
dropZoneInput("dropzone", choices = list(one = "1",
                                         two = "2",
                                         three = "3",
                                         four = "4"))

serenity-r/dragulaSelectR documentation built on Jan. 15, 2020, 11:43 p.m.