dropZoneInput: Create a dropzone input

Description Usage Arguments See Also Examples

View source: R/dndselect.R

Description

Create a dropzone input

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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

dndselectr

Examples

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

serenity-r/dragulaSelectR documentation built on March 18, 2021, 10:35 a.m.