Open fabiangehring opened 1 year ago
Hi, I don't have any guidance on including date pickers specifically, but there are ways to get custom JavaScript-based widgets into tables. It's still in need of better documentation, but here are some quick tips for now:
htmlwidgets
widget for the date picker library (or use an existing one if it exists), then all the initialization and rendering should happen automatically when rendered in reactable. This is a heavier-weight solution though, so not always feasible.initComplete
: I think an equivalent for this would be the htmlwidgets::onRender()
and htmlwidgets::onStaticRenderComplete()
functions that htmlwidgets
provides, which works for all HTML widgets. There are some examples on how to use these in the Reactable.onStateChange()
docs.preDrawCallback
/drawCallback
: Previously, the only good way to do this would have been to write a custom React component, but there's now a Reactable.onStateChange()
method in the JavaScript API that you could use to do something in the table when its state changes. For example, initialize widgets in the table when the page changes.
Hi, I'd like to have a datePicker in my table. When using DT I could do something like below. With reactable I am missing the initComplete, preDrawCallback and drawCallback. Is there a reactable-way of including datePickers in a table?
Minimal example from here