0.0.8 • Published 7 years ago
oreon-autocomplete v0.0.8
Oreon Autocomplete
This user autocomplete component can be used together with an input element. Typically this would be used together with inputs used as comments.
Usage
Follow the instructions below, start typing,
and as soon as you hit the @ a list of users will appear from which you can autocomplete by clicking on the relevant user
The autocomplete component can be used as follows:
<oreon-autocomplete [users]="users$ | async"
[inputValue]="comment"
[inputElement]="commentElement">
</oreon-autocomplete>usersis an array of objects that should have the following propertiesusernamenameavatar_url
A model interface
Useris exposed that has these properties definedinputValueis the value of the comment<input>elementinputElementis a reference to the comment<input>element itself
Installation
Install it by running npm install oreon-autocomplete or yarn add oreon-autocomplete
Tests
Tests can be run by cloning the demo project and running ng test oreon-autocomplete