I am facing a weird issue when I filter the rows using the bryntum inbuilt quickfind used here https://www.bryntum.com/products/grid/docs/api/Grid/feature/QuickFind
{
cls: 'text-center hidden-xs',
minWidth: 15,
maxWidth: 30,
flex: 1,
type: 'widget',
text: '',
icon: '',
htmlEncode: false,
cellCls: 'hidden-xs',
renderer: ({ record }) => {
var html_content = "",
job = record.data;
html_content = `<a class="updateStatus" style="margin-left:7px; display:none;float:right;" href="#" title="Update Status">
<span class="glyphicon glyphicon-play" aria-hidden="true"></span>
</a>`;
return html_content;
}
},
I have an event listener in document. ready which performs a certain action when we click on update status
$('.updateStatus').off().on('click', updateStatus);
When the page is loaded for the first time, the widget works fine and the updateStatus click event is also attached. However when I use quickFind to filter out the rows and then click on the same widget, nothing happens. I checked the clcik EventListeners for this widget on console and its not there after the filter.
I modified the code to use the onClick event for the widget but that does not seem to work either.
{
cls: 'text-center hidden-xs',
minWidth: 15,
maxWidth: 30,
flex: 1,
type: 'widget',
text: '',
icon: '',
htmlEncode: false,
cellCls: 'hidden-xs',
renderer: ({ record }) => {
var html_content = "",
job = record.data;
html_content = `<a class="updateStatus" style="margin-left:7px; display:none;float:right;" href="#" title="Update Status">
<span class="glyphicon glyphicon-play" aria-hidden="true"></span>
</a>`;
return html_content;
},
onClick: ({ record }) => {
// Handle the click event for the "updateStatus" widget
debugger;
console.log(`Update Status for record ID ${record.data.id}`);
updateStatus();
}
}
Not exactly sure why the onClick event listener is not being triggered