@mdavis95 @payammeyer this also means that boolean props in Vue GWT now behave like in Vue.
Let’s say you have this prop declared:
@Prop boolean myProp
Not passing it to your component will now make it false by default instead of undefined.
Also, passing it just as an attribute that you don’t bind will set the prop to true:
<my-component my-prop />
Vue does that for a prop when you tell it it’s type is a JS Boolean, which we now do by default as mentioned above :+1:
We have an MR being prepared by @jtrentes that also improves support for Java Boolean Prop. Not binding those will results in
null by default, and passing it as an attribute will result in true (to get false you bind explicitly false)
Hi folks, I'm looking for a way to include a standard ES6 component in a vueGWT app. The custom element is registered to the DOM outside of vue, and I can include it in a vue template and it will work, however Vue will complain about the element being improperly registered / unknown (
vue.js:584 [Vue warn]: Unknown custom element: <sizer-element> - did you register the component correctly?) - to solve this I've added v-pre to the custom element so vue will ignore it and the warning goes away. However, I also have a
ref on the element so I can fire some (resize) events into it programmatically - this is no longer evaluated when I add
v-pre and so the element I need a reference to will be undefined.
Does anyone have any ideas to how I might achieve this without warnings?
v-premakes Vue think this is just "text" so it probably break the ref. The
ignoreElementsseems to be explicitely defined for your use case 👍
final JsString str = Js.cast(ignoredElement); this.ignoredElements.push(str);