Is there a way to automatically remove spaces at the end of a 10-digit number when it is copied from another source (like email or Word documents) and pasted into the search bar?
Currently, this function only works when we press enter. I would like for blank spaces to be removed immediately upon pasting the number.
public onSearchPolicy(event: any){
let searchPolicyNumber = event.target?.value?.trim();
if (searchPolicyNumber){
let searchPolicyObject = {
policy : searchPolicyNumber,}};