Bootstrap filter control doesn't working correctly for cells with hyperlinks?
See original GitHub issuePlease view the example. I have a cell created like this.
<td>
<a href="https://www.google.com" target="_blank">
3 (10.0 %)
</a>
</td>
Now, in above cell actual data value is 3 (10.0 %) but when I type “google” in filter box it shows the cell with value 3 (10.0 %) which means it is taking whole hyperlink tag as cell value.
How i can achieve the correct filtering behavior for cells with hyperlinks ? May be I am following wrong approach for inserting hyperlink in table cell ? Any help or hint will be much appreciated.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
In the example provided, the problem is that the value of the cell is indeed:
I think we can use
formatter
andsearchFormatter
column options to solve the problem:I have a similar issue like @dvhassel! In my case I have to be able to filter on cell contents which may have HTML-Tags included. The rows have to be filterable by select.
<strong>foo</strong> bar
<i>foo</i> bar
<a href="#">foo</a> bar
By default the whole string will be taken by the select. A filtering leads to no results@dvhassel I created a possible solution. If you create an object and pass it to the
data-filter-data
pattern it seems to work properly. http://jsfiddle.net/yd5wo8ha/I will now try try to find a way matching my case as well.
Read more comments on GitHub >Top Results From Across the Web
Top Related Medium Post
Top Related StackOverflow Question
Troubleshoot Live Code
Top Related Reddit Thread
Top Related Hackernoon Post
Top Related Tweet
Top Related Dev.to Post
Top Related Hashnode Post
showFooter IE8 - Object expected error
When using the cookie plugin, the first ajax call isn't fired