Closed AbhimanyuAryan closed 10 months ago
@hhaensel have you seen this issue before. I am completely lost why is this happening. Could be CSS rendering and style issue? I am debugging this but if you know what's happening please let me know
You need to bind vectors of String:
@app begin
@out textmsg1 = ["hey, how are you?"]
@out textmsg2 = ["I am good"]
end
function ui()
[
Html.div(class="q-pa-md row justify-center",[
Html.div(style="width: 100%; max-width: 400px",[
quasar(:chat__message, text = :textmsg1, name="abhi", sent = true)
quasar(:chat__message, text = :textmsg2, name="adrian")
])
])
]
end
route("/") do
model = @init
page(model, ui()) |> html
end
EDIT: I had to change the routing, because somehow page always wants to cache the page and doesn't understand the quasar()
output.
@essenciary not sure where this happens and how to get around this.
Why is this? (Not necessarily to @AbhimanyuAryan but to everyone who is developing a new feature which is not yet incorporated in StippleUI and hasn't got a lot of experience with Vue.js) The demo code on quasar looks like this:
<q-chat-message
name="me"
:text="['hey, how are you?']"
sent
/>
Note that the text is preceded by a colon which means that the content is evaluated as javascript expression in the name space of the vue model. That means that the content is an array of strings. If you would have written the text explicitly as in the example, you would have seen a correct result. But if you bind it to a variable that variable needs to contain an array of strings.
@AbhimanyuAryan please close this if you are fine with the responses
DEMO:
now the code is correct and the output html is also correct. I can see in vue console but nothing renders on screen