posit-dev / shiny-bindings

Monorepo containing Javascript packages that simplify the experience of writing custom bindings for Shiny apps
10 stars 2 forks source link

Support Passing Props to `makeReactInput` #8

Open pstorozenko opened 4 months ago

pstorozenko commented 4 months ago

Description

Currently, it is not possible to pass props from Python to React components with makeReactInput. This feature is crucial for the flexibility and usability of the package, allowing developers to fully leverage React's capabilities from within PyShiny.

Problem example

I want to be able to create component with input_my_custom_button("id", label="Click me").

Solution

We thought about this problem and @Gotfrid proposes the #7 PR as a solution. Please tell me if it looks good or you see tackling of this problem in a different way.

Additional note

Maybe something similar would be important for outputs as well.

pstorozenko commented 3 months ago

@schloerke is this something relevant or do you plan to handle the issue in a different way in Shiny?