Questions about html filter in ng2-smart-table
See original GitHub issueI have 2 questions: 1 - What configuration do I need to make so that a column filter is activated when typing 1 character? In my implementation it works from 2 characters. 2 - I put the type of a column in my table as html because it shows a stripe with status color. As the column type is html how can I filter this column? Below is an example of a piece of code.
statusRDO: {
title: ‘Status RDO’,
type: ‘html’,
valuePrepareFunction: (row, data) => {
if (data.status === “1”){
return <div class="text-left" id="1"><span class="badge badge-warning">PREENCHENDO RELATÓRIO</span></div>
;
}
else if (data.status === “2”){
return <div class="text-left" id="2"><span class="badge badge-danger">REVISAR RELATÓRIO</span></div>
;
}
else if (data.status === “3”){
return <div class="text-left" id="3"><span class="badge badge-success">APROVADO</span></div>
;
}
},
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top GitHub Comments
It worked! Thank you!
@hakimzulcode There is a table setting property
onComponentInitFunction
.You can use it like below.