2.1.1 • Published 5 years ago

bs-combogrid v2.1.1

Weekly downloads
12
License
-
Repository
-
Last release
5 years ago

Bootstrap Combogrid

JQuery Combogrid input for Twitter Bootstrap v4.x

For use with Bootstrap v3.x, use the latest v1.x version of the plugin.

Getting Started

In your web page:

<script src="jquery.js"></script>
<script src="dist/bs-combogrid.min.js"></script>
<link rel="stylesheet" href="dist/jquery.bs-combogrid.min.css">
<script>
jQuery(function($) {
  $('input').bs_combogrid(options);
});
</script>

Documentation

options is an object with the following keys:

NameTypeDefaultDescription
length{Int}10Number of rows per page.
emptyMessage{String}'No results were found'Text shown when a search returns no results.
ajax{Object}{}An settings object just like the one passed to $.ajax().At least the url parameter is needed.
searchButton{String|boolean}falseThe CSS selector of the button that triggers the search, or false if no button is used.Note that pressing Enter always submits the search, regardless of using a search button or not.
onItemSelect{function}See source codeA function that is run when the user selects one of the returned results, which only parameter is the selected row data.By default, it searches in the selected row for a key:value pair whose key matches the input name and sets its value to the input.
tableClass{String}mb-0 table-hover table-smExtra classes added to the results table.
containerWidth{String|null}nullIf informed, sets the container's css width to the specified value.

Examples

At the root folder, run npm run demo, browse to https://localhost:8080 and try searching some videogame titles and consoles!

2.1.1

5 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.1.0

6 years ago

2.0.1

6 years ago