0

I have been using Angular 4 with primeng 4 . When sorting is done with
p-datatable of primeng it highlights the column header being sorted. Example : https://www.primefaces.org/primeng/#/datatable/sort

But when filtering is done here, the column header is not highlighted . Example : https://www.primefaces.org/primeng/#/datatable/filter

When I checked with chromebug, I was able to see every time sorting is done , a class gets added : ui-state-active , but this class does not get added while filtering .

Can anybody suggest me as to how I can highlight a column header while filtering like it's being done in sort in the example up above ?

Andrei Matracaru
  • 3,511
  • 1
  • 25
  • 29
The Dark Knight
  • 5,455
  • 11
  • 54
  • 95

1 Answers1

-1

style="#{car.remarks eq rsm.search ? 'color:red':'color:blue'}"

  • car = datatable variable. remarks = column name,rsm = bean name,search = String variable create in bean,eq = equals (here if the search contains equal to the column value then the color became red,else blue ,capital letter and small letter also listen) – fayis kottakkal Nov 12 '18 at 06:46
  • Please add your comments to the answer so that they can be easily read by people visiting the question. – Nick Nov 12 '18 at 10:30
  • please update your answer with the content of your comment. Use the `edit` function – JimHawkins Nov 12 '18 at 12:03