When using the data-search option to create an input field, it will have two classes: form-control
(which inherits Bootstrap styling including box-shadow for focused input) and search-input
, a class unique to bootstrap-table that can override the default behavior.
Make sure no other element on your page has the same class if you don't want to unintentionally override their styles.
To customize the input field, you can use the following CSS code. While there might be a way to do it with SASS, I find CSS the simplest and most clear method for this example.
.search-input:focus {
box-shadow: none;
border: 1px solid #ced4da;
}
The style defined by .search-input:focus
will only take effect when the input is focused.
box-shadow: none;
removes the box shadow effect.
If you want the input field to maintain a consistent look regardless of focus, you can use border: 1px solid #ced4da;
to mimic its unfocused appearance.
For a live demonstration of this, you can visit the Bootstrap-table online editor.