I have a child component with an <input> element. I can customize the component from a parent using several attributes like placeholder, maxlength, required, etc. But I cannot get type= to fallthrough like the rest.
I've searched for hours but I can't find anything that specifies that 'type=' is handled differently...
For example:
Parent component:
<template> <child-component type=text maxlength=20 /> </template>
Child component
<template> <input :type="[$attrs.type]" :maxlength="[$attrs.maxlength]" /> </template>
'maxlength' and other attributes fall through as expected, including parent's class and style attributes merging with the child's class and style attributes.
:type="$attrs.type ?? '' ". And better to use a prop at this point because you modify how the attribute works