You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Its confusing that the 1) The id is required and this requirement is not mentioned in the guide https://panel.holoviz.org/user_guide/Custom_Components.html#reactivehtml-components and 2) The in the guide the id is called input and the onclick method is called _input_click. The relation in the example between the name of the input and the name of the callback makes it hard to figure out what is required and what is not.
I can now see that 1) the id is required 2) the callback can have any name.
The text was updated successfully, but these errors were encountered:
ValueError: DOM nodes with an attached callback must declare an id. Found node with onclick callback referencing _callback method. Add an id attribute like this: <img id="img" onclick="${_callback}>...</img>.
Also going to be stricter about linked parameters (${parameter}) vs. literals ({{ parameter }}):
ValueError: DOM node with a linked parameter declaration must declare an id. Found node with the src attribute referencing the index parameter. Either declare an id on the node, i.e. <img id="img" src="https://picsum.photos/800/300?image=${index}">...</img>, or insert the value as a literal: <img src="https://picsum.photos/800/300?image={{index}}">...</img>.
I'm on Panel 0.12.1 exploring the
ReactiveHTML
.Not Working - No
id
onimg
Nothing happens when I click
Working
If I change the
_template
toAdditional Context
Its confusing that the 1) The
id
is required and this requirement is not mentioned in the guide https://panel.holoviz.org/user_guide/Custom_Components.html#reactivehtml-components and 2) The in the guide theid
is calledinput
and theonclick
method is called_input_click
. The relation in the example between the name of the input and the name of the callback makes it hard to figure out what is required and what is not.I can now see that 1) the id is required 2) the callback can have any name.
The text was updated successfully, but these errors were encountered: