From 79f5d8f3fa5c484ab2e20797bd9586a585bd592a Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 28 Jun 2022 16:29:08 +0200 Subject: [PATCH] MVC / bootgrid - merge option objects in stead of replacing them. closes https://github.com/opnsense/core/pull/5833 --- src/opnsense/www/js/opnsense_bootgrid_plugin.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/opnsense/www/js/opnsense_bootgrid_plugin.js b/src/opnsense/www/js/opnsense_bootgrid_plugin.js index bd1af0721..31d6603e7 100644 --- a/src/opnsense/www/js/opnsense_bootgrid_plugin.js +++ b/src/opnsense/www/js/opnsense_bootgrid_plugin.js @@ -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; + } }); }