ng2-ui / auto-complete

Angular Auto Complete component and directive
https://ng2-ui.github.io/dist/#/auto-complete
MIT License
279 stars 123 forks source link

Styling the list of options #268

Closed renanmoraes closed 7 years ago

renanmoraes commented 7 years ago

IMPORTANT Please be specific with an example. An issue with no example may be closed.

Steps to reproduce and a minimal demo

Current behavior I am not able to apply any style to the list, I need to move it like for example zmenting the index as giving a float: left among others.

I think this is because this information is set to my tag.

Expected/desired behavior In my expectation is that I can define the style I want the list of options.

Other information I'm using materialize along with angular 2, and my input looks like this:

<div class="input-field col s12">
      <i class="material-icons prefix input-icon">map</i>
      <input ngui-auto-complete
               class="validate"
               type="text"
               materialize="autocomplete"
               id="autocomplete-state"
               placeholder="Informe seu estado"
               [(ngModel)]="selectedState"
               [source]="states"
               list-formatter="name"
               display-property-name="name"
               max-num-list="5"
               tab-to-select="true"
               auto-select-first-item="true"
               no-match-found-text="Nenhum estado com este nome"
        />
      </div>

This is the view I have when clicking on the input

captura de tela de 2017-09-04 17-27-42

balaganapathynt commented 7 years ago

Try this. Change the inline css properties inside ng2-auto-complete>dist>ng2-auto-complete.directive and ng2-auto-complete.component.js file. For Dropdown position you should change css in ng2-auto-complete.directive. For list hover color - ng2-auto-complete.component.js