alessiomaffeis / vue-picture-input

Mobile-friendly picture file input component for Vue.js 2-3 with image preview, drag and drop, EXIF orientation, and more
MIT License
887 stars 156 forks source link

Impossible to add custom id #148

Closed emavitta closed 1 year ago

emavitta commented 3 years ago

Even though i set the id as a prop to the component, in the frontend it keeps printing

id="picture-input" class="picture-input"

As per https://github.com/alessiomaffeis/vue-picture-input/blob/c2e1241f632d932c4326848237c6465239185001/PictureInput.vue#L2 the id is not updated by the prop id.

emavitta commented 3 years ago

suggested fix

:id="id||'picture-input'"

i'll try to make a pr

emavitta commented 3 years ago

damn i've just read better the docs... the id is for the input and it works. Nonetheless i think ti could be necessary to add an idcontainer prop, preventing duplicate id if the component is used more then once in the same page.