MVC / bootgrid - merge option objects in stead of replacing them. closes https://github.com/opnsense/core/pull/5833

This commit is contained in:
Ad Schellevis 2022-06-28 16:29:08 +02:00
parent 690372b54a
commit 79f5d8f3fa

View File

@ -140,7 +140,11 @@ $.fn.UIBootgrid = function (params) {
// merge additional options (if any)
if (params['options'] !== undefined) {
$.each(params['options'], function(key, value) {
gridopt[key] = value;
if (typeof(value) === 'object') {
gridopt[key] = Object.assign({}, gridopt[key], value);
} else {
gridopt[key] = value;
}
});
}