I cannot increase the width of my input

Asked

Viewed 98 times

1

I cannot increase the width of this input. I use bootstrap and css. In my code, there is no such input tag...

                <div className="form-group col-sm-12 col-lg-8">                  
                  {employees.length > 0 && (
                     <AutoCompleteEmployee
                      listEmployee={employees}
                      onChange={this.handleChangeSearch}
                    /> 
                    )}              
               </div>
    </div>

There’s nothing at the moment in my css about this...

  • 2

    Veronica, if you’re using React, it’s likely that the tag <input> is inside the component AutoCompleteEmployee.

  • how do I style this component ? ...

  • 1

    Just open his file and modify... There is no import AutoCompleteEmployee in your file indicating where the component is?

  • return (&#xA; <Fragment>&#xA; <input&#xA; type="text"&#xA; onChange={onChange}&#xA; onKeyDown={onKeyDown}&#xA; value={userInput}&#xA; />&#xA; {suggestionsListComponent}&#xA; </Fragment>&#xA; );&#xA; } I have this, I set the style and it doesn’t work

  • 1

    Then you need to use the attribute style, or use classes to style with your CSS or Bootstrap.. You could add class="form-control" for example, but then it’s up to you. It depends on how you want to do..

  • I got it! I was doing the wrong style... thank you

  • @Verônicaemschermann put the answer here and mark as resolved please

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.