New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default widgetOptions are overwritten #1356
Comments
Hi @TheMrH! I see what you're saying, but I can't duplicate the problem you're having... if I add a $.extend(true, $.tablesorter.defaults, {
widgetOptions: {
filter_placeholder: {
search: 'Search...'
}
}
});
$(function() {
$('table').tablesorter({
theme: 'blue',
widgets: ['zebra', 'filter'],
widgetOptions: {
// filter_placeholder: { search: 'x' }
}
});
}); If I comment out the Would you please modify that demo to show the issue you're describing? |
Hello @Mottie , Thank you for the swift reply and demo code. I've added another table which shows the problem at hand: the second table does not have the defaults applied, in this case no search text in the filter fields. |
Please modify the demo I shared, then use the "Update" button at the top. Then please, copy the new URL and share it with me. |
Oops, I didn't know the url would be updated. Here is the new url: updated demo. All I did was add a second table. |
Hi @TheMrH! Sorry for the delay! I've been out of the country for the past 3 weeks. I do see the issue now and believe I have a fix. It will be available in the master branch for now. Expect a new release soon. |
When i set some defaults with
$.extend(true, $.tablesorter.defaults, { widgetOptions: { stickyHeaders_includeCaption: true, filter_columnFilters: false }, ...
and I have multiple tables on a page the defaults get overwritten in jquery.tablesorter.js @ line 1932 applyWidgetOptions:
$.extend( true, ts.defaults.widgetOptions, widget.options );
The text was updated successfully, but these errors were encountered: