how to add placeholder text in the filter box in datatable column headers

后端 未结 5 1606
暖寄归人
暖寄归人 2021-01-21 14:31

I have a prime faces datatable with few columns and have filteryBy attribute for all the columns. How do I add placeholder or watermark to provide hint for users. Any suggestion

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-21 14:48

    You can change this without overriding the placeholder attribute by going to jquery.dataTables.js line 2701 and replacing

    .attr( 'placeholder', language.sSearchPlaceholder )

    with

    .attr( 'placeholder', 'Search table...' )

    You could also find the sSearchPlaceholder variable which is probably located in a language file and replace that.

提交回复
热议问题