Gbuomprisco / ngx-chips

Tag Input component for Angular
MIT License
899 stars 359 forks source link

focusFirstElement not forcus in the first item #975

Open NguyenVanBay101097 opened 3 years ago

NguyenVanBay101097 commented 3 years ago

PLEASE MAKE SURE THAT:

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[ ] support request/question

Notice: feature requests will be ignored, submit a PR if you'd like

Current behavior

i add [focusFirstElement] = "true" but not working Expected behavior

Minimal reproduction of the problem with instructions (if applicable)

What do you use to build your app?. Please specify the version

Angular version:

angular 8,

ngx-chips version:

2.2 Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

NguyenVanBay101097 commented 3 years ago

<tag-input [ngModel]="['@item']" [onlyFromAutocomplete]="false"> <tag-input-dropdown [showDropdownIfEmpty]="true" [focusFirstElement]="true" [displayBy]="'value'" [identifyBy]="'id'" [autocompleteItems]="autocompleteItemsAsObjects">

({{ index }}) {{ item.id }}: {{ item.value }}
    </tag-input-dropdown>
</tag-input>

////// autocompleteItemsAsObjects = [ {value: 'Item1', id: 0, extra: 0}, {value: 'item2', id: 1, extra: 1}, {value: 'item3', id: 2, extra: 2} ]; **** explain: i test it, but no forcus in the first item, it's really important, i think so