Open PGimenez opened 9 months ago
It does trigger the backend, but it fails assigning the value to rowcontent
, because rowcontent
is initialised to be of type String
, but rowcontent on the client side is an object.
Whenever you are not sure what will be transmitted by the program, you can initialise the app variable of type Any
.
@app begin
@in id = 0
@in rowcontent::Any = ""
<...>
end
Then click the row and you will find that rowcontent is of type Dict{String, Any}
and you can chose this type for initialisation.
You could, of course, also initalise rowcontent as row = Dict{Symbol, Any}()
, and everything will work out as well.
@PGimenez coudl you verify and close? Otherwise please comment
I'm trying to add interactivity to a table such that when a click is made on a row, the row id and its content are stored in two variables
id
androwcontent
. I have two handlers attached to each of the variables to display their contents when they change. When I select a row, the variablerowcontent
is updated in the front end but its value is not propagated to the back. This is the event handler definitionHowever, if I do
rowcontent = String(row)
then it works.Moreover, I have two buttons to clear the selection. One clears the variables directly, whereas the other uses an anonymous function. Both buttons work so the issue seems not to be in the use of an anonymous function.
Perhaps it's that assigning one variable to the other like
rowcontent=row
does not trigger the handler in table event functions?Here's the MWE code: