I have a search box to find matches within the grid. It's setup as follows:
searchText(value) {
this.$refs.grid.gridInstance.features.search.search(value, true, true)
if (value) {
this.$emit('searchCount', this.$refs.grid.gridInstance.features.search.foundCount)
} else {
this.$emit('searchCount', 0)
}
},
I have an id number that is a link to another part of my app in one of the table columns
{
text: 'Title Number',
field: 'titleNumber',
width: 150,
htmlEncode: false,
locked: true,
cellCls: 'grid-title-number',
renderer: ({ isExport, record, value }) => {
const url = `/titles/${ value }`
if (!isExport) {
return value ? `<a href="${ url }" target="_blank" >${ value }</a>` : '-'
}
return value
},
},
When this is a search match though, the html is displayed as part of the link.
I can see in the html that Bryntum has added a span tag into the middle of the anchor tag!
<a href="/titles/NYK4<span class=" b-search-hit-text"="">12139" target="_blank" >NYK412139</a>
Is this a known issue? And how do I stop it happening?