Text align in autocompletebox

Hello,

is there a possibility to set text-align in autocompletebox?

I tried to do it with CSS, because I was unable to find textalign property in AutoCompleteBox parameters. But still I can not set it always to be display from start. When my data in autocompletebox is set automatically (not when I am setting it by hand), I see my text displayed not from start:  (full text is WWW1WWW2WWW3WWW4WWW5WWW6WWW7WWW8WWW9WWW1). As you can see from picture, in autocomplete box I see it not from starting position.

1 Reply

AP Arun Palaniyandi Syncfusion Team March 7, 2018 11:51 AM UTC

Dear customer,  
   
Thanks for contacting Syncfusion Support.   
   
We have tried your reported scenario for setting the text automatically and we can reproduce your mentioned issue. After validation, we found that this issue is due to changing of scrollLeft position of the element since it’s a standard behavior of setting the cursor to last. So, we suggest you to change the scrollLeft position of the element to 0 in the create event to set the text align as rquested. Please find the below code snippets.   
   
   
  onCreate(event) { //create event   
       
    var obj = $("#databindinglocal").ejAutocomplete("instance")   
        
    obj.element[0].scrollLeft = 0// set the scrollLeft to 0   
       
   }    
   
   
   
   
We have also shared a sample below for your reference.   
   
   
API Link:   
   
Please check the shared details and solution and let us know if you have any further queries.    
   
   
Regards,   
Arun P.   


Loader.
Up arrow icon