Input is valid when a list with a repeated tag is pasted - the input shows no value.
leonardobork opened this issue · comments
Without copying and pasting everything seems ok - form is invalid 👍
Copying and pasting things get tricky - numbers disappear (at first sight), but form remains valid and with the inserted list (even with the repeated value) 👎
The expected to happen is the same as the first print - invalid form with the list showing.
The appointed error is the following : Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: tag in tagList.items track by track(tag), Duplicate key: 0015417, Duplicate value: {"text":"0015417"}
Source code:
<div class="form-group">
<label>Código (PLU):</label>
<tags-input type="number" onkeypress='return event.charCode >= 48 && event.charCode <= 57' use-strings="true" class="bootstrap" placeholder="Informe um ou mais códigos de produtos para pesquisa" replace-spaces-with-dashes="true"
ng-model="prodCtrl.productsIds" min-length="7" max-length="7" add-on-paste="true" paste-split-pattern=";"></tags-input>
</div>