I have an ng-select component. I want to trim the input text the user puts in as s/he types. I have the below code i can take the text the user types but i could not figure out a way to put the trimmed text back to ng-select.
<ng-select #vehicleInfoSelect [allowClear]="true"
[(items)]="vehicleNumberList"
(selected)="vehicleNoSelected($event)"
(removed)="vehicleNoRemoved($event)"
(typed)="vehicleNumberTyped($event)"
placeholder="{{'vehicleInfo.placeHolder.filterVehicleNumberSelectBox'|translate}}">
</ng-select>
Typescript code
@ViewChild('vehicleInfoSelect') public vehicleInfoSelect: SelectComponent;
vehicleNumberTyped(text:String){
console.log(text);
// here i want to trim the text and
// set the input field of the ng-select;
}
Any help would be great. Thanks..