Subscribe on changes!

Custom element - Prop String will be parsed to a Number

avatar
Aug 25th 2021

Version

3.2.6

Reproduction link

https://codesandbox.io/s/black-butterfly-egj7x?file=/src/main.js

Steps to reproduce

  1. Create a defineCustomElement with two props (language, externalId) from type String
  2. Insert the custom element into a html page and define the attributes as follows:

language="de" externalid="4332cdd-3243443d22" 3. The prop externalId is parsed to a number and contains the value 4332

What is expected?

The prop from type String should not be parsed to a number and the component should receive the exact same value

What is actually happening?

The prop externalId from type String is automatically parsed to a number