esvit / ng-table

Simple table with sorting and filtering on AngularJS
http://esvit.github.io/ng-table
BSD 3-Clause "New" or "Revised" License
2.77k stars 851 forks source link

Problem with --> filter="{ name: 'text'}" <-- #1021

Open mimial6 opened 7 years ago

mimial6 commented 7 years ago

Hello.

I was testing the example of http://ng-table.com/#/ and I don't achieve that in the name colum appears the box for filtering. The box was positioning in the middle of the table.

The problem is that ng-table library sustitutes filter="{ name: 'text'}" for input type=text and in HTML5 it doesn't work input type=text. In HTML5 it works input type=search. Thus, I have downloaded the https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.js and I have changed that:

<input type=text name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class="input-filter form-control" placeholder="{{getFilterPlaceholderValue(filter, name)}}"/>

for this:

<input type=search name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class="input-filter form-control" placeholder="{{getFilterPlaceholderValue(filter, name)}}"/>

I hope that my contribution will be useful for someone.

Bye.