Code Monkey home page Code Monkey logo

bs-combogrid's Introduction

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:

Name Type Default Description
length {Int} 10 Number 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} false The 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 code A 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-sm Extra classes added to the results table.
containerWidth {String|null} null If 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!

bs-combogrid's People

Contributors

rodrigobalest avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.