From c61e53da8cc8e2b08e06c500566fb9b3bbfecbc4 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 18 May 2018 12:18:30 +0530 Subject: [PATCH] [fix] headerDropdown option merge --- src/datatable.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/datatable.js b/src/datatable.js index 9a57f3c..a7f70a6 100644 --- a/src/datatable.js +++ b/src/datatable.js @@ -45,8 +45,11 @@ class DataTable { this.options || {}, options ); - this.options.headerDropdown - .push(...(options.headerDropdown || [])); + options.headerDropdown = options.headerDropdown || []; + this.options.headerDropdown = [ + ...DEFAULT_OPTIONS.headerDropdown, + ...options.headerDropdown + ]; // custom user events this.events = Object.assign(