-
-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More flexible control over ReactiveHTML child rendering #2115
Conversation
Should this be renamed to ReactiveTemplate or just Reactive then @philippjfr ? |
d67fe9a
to
eac4312
Compare
eac4312
to
9910485
Compare
Codecov Report
@@ Coverage Diff @@
## master #2115 +/- ##
==========================================
- Coverage 84.27% 83.86% -0.41%
==========================================
Files 182 182
Lines 21415 21095 -320
==========================================
- Hits 18047 17692 -355
- Misses 3368 3403 +35
Continue to review full report at Codecov.
|
Merging and releasing a dev release. This will need revisiting and further tweaking though. @xavArtley Note that you have to rename |
This PR aims to provide better control over the way children of DOM nodes are rendered inside ReactiveHTML. Specifically this PR adds a
_child_config
parameter. Additionally this PR renames the_html
to_template
.Child types
'model'
: The children are treated as Panel components, converted usingpn.panel
and inserted by bokeh as model roots.'literal'
: The children are treated as a literal string.'template'
: The child parameter treated like other DOM attributes, i.e. they are templated into the_template
and bi-directionally synced.Child templates
The
_child_config
may also declare a child template which will be used to wrap children which are of'model'
and'literal'
type.Example
This kind of control is important for many types of component, e.g. here is a
<select>
component which has to template its children:Fixes #2114