cyberhobo / ColumnFilterWidgets

This is an add-on for the DataTables plugin for jQuery that creates filtering widgets based on the data in table columns.
69 stars 34 forks source link

Drop down header is displaying html #42

Open BrettAndo opened 7 years ago

BrettAndo commented 7 years ago

Hi, I've implemented this on my SharePoint site and DataTables loads perfectly but for each column drop-down, it's displaying the full html inside the header. So instead of the label displaying, it shows the following: <div sortable="" sortdisable="" filterdisable="" filterable="" filterdisablemessage="" name="Proximity" ctxnum="653" displayname="Proximity" fieldtype="DateTime" resulttype="" sortfields="View={67c3e33b-8110-4eaa-be19-28d5c67f2c0a}&amp;SortField=Proximity&amp;SortDir=Asc" class="ms-vh-div"><a id="diidSortProximity" onfocus="OnFocusFilter(this)" href="javascript:" onclick="javascript:return OnClickFilter(this,event);" sortingfields="View={67c3e33b-8110-4eaa-be19-28d5c67f2c0a}&amp;SortField=Proximity&amp;SortDir=Asc">Proximity<img src="/_layouts/images/blank.gif" class="ms-hidden" border="0" width="1" height="1" alt=""></a><img src="/_layouts/images/blank.gif" alt="" border="0"><img src="/_layouts/images/blank.gif" border="0" alt=""></div><div class="s4-ctx"><span>&nbsp;</span><a onfocus="OnChildColumn(this.parentNode.parentNode); return false;" onclick="PopMenuFromChevron(event); return false;" href="javascript:;" title="Open Menu"></a><span>&nbsp;</span></div>

So the label should be "Proximity". The drop-down values display correctly as text.

Does anyone know what I need to change in the ColumnFilterWidgets.js file to render this as html?

cyberhobo commented 7 years ago

I took a look at the ColumnFilterWidget examples with version 1.10.12 of DataTables and didn't see this. If you can reproduce it somewhere I can see I'll take a look.

BrettAndo commented 7 years ago

to add to my description above; The Column header is a javascript hyperlink, so when datatables grabs the column header, it's grabbing all the javascript html within that . I am going with a dataview web part for now, if anyone else is using this with Datatables for SharePoint.