Search Pane row grouping
Search Pane row grouping

I have a table which has form inputs in the columns for a date. I am trying to have the searchPane filter by the value of that input field. I have a custom render function which pulls the value of that input field and that works great. However I am getting duplicate rows in the search pane. Does anyone have any insight on how to overcome this?
If you look at https://s3.amazonaws.com/pramadillo/InteleWorx_-_Rent_Case_Manager_2020-10-01_09-54-54.png this is an example of my search pane.
This is the render code I am using
{
searchPanes:{
show: true,
dtOpts: {
"columnDefs": [{
"targets": 0,
"render": function(data, type, row, meta) {
var position = (data.search('value="') + 7);
var date = data.substring(position, (position + 10));
return '<span class="dtsp-name">' + date + '</span><span class="pill badge badge-pill badge-secondary">' + row.total + '</span>';
}
}]
}
},
targets: [23],
},
Answers
Also, I have tried using the
data-search
attribute and simply input the raw date in there, that however did not have any affect on the search pane.Hi @mattpram,
I'd guess that your renderer is returning different values for each of those cells? Can you check what it is returning each time please.
In order to help any more can you please provide a test case. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Thanks,
Sandy
hey @sandy yes those cells all do have different values, so I know why it is doing it, I was just wondering if there was a way around that. In the meantime, I simply just added a new column with the raw date, and then hid that column from my table using css
Hi @mattpram ,
If the values are different then SearchPanes will give them all their own option. Your solution works. Another option would be to add custom options using
columns.searchPanes.options
Thanks,
Sandy