From 7280ba8a1924a75d6bb6abcebdaf019a52afbc50 Mon Sep 17 00:00:00 2001 From: Mike Harvey Date: Tue, 27 Oct 2015 19:38:58 -0400 Subject: [PATCH] Disable Search Option Ability to disable search field in the header by setting disabled: true in searchSettings --- dist/jquery.bootgrid.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dist/jquery.bootgrid.js b/dist/jquery.bootgrid.js index 4f27d44..8a4d222 100644 --- a/dist/jquery.bootgrid.js +++ b/dist/jquery.bootgrid.js @@ -714,8 +714,9 @@ var css = this.options.css, selector = getCssSelector(css.search), searchItems = findFooterAndHeaderItems.call(this, selector); - - if (searchItems.length > 0) + + // allows for search field to be be disabled in the head by setting disabled: true in searchSettings + if ((searchItems.length > 0) && (!(this.options.searchSettings.disabled))) { var that = this, tpl = this.options.templates, @@ -2039,4 +2040,4 @@ // ============ $("[data-toggle=\"bootgrid\"]").bootgrid(); -})(jQuery, window); \ No newline at end of file +})(jQuery, window);