Skip to contents

Select input for reactable column cell

Usage

dropdown_extra(id, choices, key = NULL, ...)

Arguments

id

id of the select input

choices

vector of choices

key

alternative unique id for server side processing

...

parameters of date input, only class is supported for now

Value

Custom JS dropdown renderer for reactable

Examples

reactable::colDef(
  cell = dropdown_extra("dropdown",
  choices = letters[1:5],
  class = "table-dropdown"
  )
 )
#> $cell
#> [1] "function(cellInfo) {\n              return React.createElement(dropdownExtras,\n              {id: 'dropdown', value: cellInfo.value,\n               uuid: cellInfo.row['.internal_uuid'] ? cellInfo.row['.internal_uuid'] : (Number(cellInfo.id) + 1), column: cellInfo.column.id , class: 'table-dropdown', className: 'table-dropdown' , choices: [\"a\",\"b\",\"c\",\"d\",\"e\"]}, cellInfo.id)\n        }"
#> attr(,"class")
#> [1] "JS_EVAL"
#> 
#> attr(,"class")
#> [1] "colDef"