Vuejs.org: The example given for "Disabling Attribute Inheritance" doesn't work

Created on 3 Sep 2018  路  5Comments  路  Source: vuejs/vuejs.org

The docs show an example for how to disable attribute inheritance (https://vuejs.org/v2/guide/components-props.html#Disabling-Attribute-Inheritance) - I tried, and it doesn't work!
In this example, the placeholder is passed to the input, but class is not, it is applied to the root-element, label. Are the docs wrong, or is something broken in Vue?
As a side note, the example uses a label prop for the child component, but doesn't pass it in as an attribute.
Here is my js-fiddle example, almost straight out of the docs (with some css for clarity)
https://jsfiddle.net/estherh/y12eb6xg/

bug enhancement

Most helpful comment

From docs:

Note: this option does not affect class and style bindings.

Perhaps this note could appear in guide, too?

All 5 comments

From docs:

Note: this option does not affect class and style bindings.

Perhaps this note could appear in guide, too?

Indeed. And the example should not use class, of course.

Would you be interested in doing a small PR?

@LinusBorg I'll give it a try.

@leopiccionia Any progress on this one?

@phanan I've closed my original PR, I'll open an improved one yet today.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andreasvirkus picture andreasvirkus  路  3Comments

emileber picture emileber  路  5Comments

robwierzbowski picture robwierzbowski  路  3Comments

yyx990803 picture yyx990803  路  4Comments

jgtorrejon picture jgtorrejon  路  5Comments