How to use the bootstrap.dropdown function in bootstrap

To help you get started, we’ve selected a few bootstrap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github skratchdot / react-bootstrap-multiselect / lib / index.js View on Github external
if (typeof window !== 'undefined' && window && window.jQuery) {
  $ = window.jQuery;
} else {
  $ = require('jquery');
  window.jQuery = $;
}

var BS = require('bootstrap');
var React = require('react');
var objectAssign = require('object-assign');
var getOptions = require('./get-options.js');
var bsMultiselect = require('./bootstrap-multiselect.js');
var bsDropdown;

// make it play nice when we already have bootstrap dropdown loaded.
if (typeof BS === 'undefined' || typeof BS.dropdown === 'undefined') {
	bsDropdown = require('./bootstrap-dropdown.js');
}
else {
	bsDropdown = BS.dropdown;
}

$ = bsDropdown.init($);
$ = bsMultiselect.init($);

/* this is our exported React class */
class MultiSelect extends React.Component {
	constructor(props) {
		super(props);

		this.$multiselect = null;
		this.options = getOptions();
github skratchdot / react-bootstrap-multiselect / lib / index.js View on Github external
window.jQuery = $;
}

var BS = require('bootstrap');
var React = require('react');
var objectAssign = require('object-assign');
var getOptions = require('./get-options.js');
var bsMultiselect = require('./bootstrap-multiselect.js');
var bsDropdown;

// make it play nice when we already have bootstrap dropdown loaded.
if (typeof BS === 'undefined' || typeof BS.dropdown === 'undefined') {
	bsDropdown = require('./bootstrap-dropdown.js');
}
else {
	bsDropdown = BS.dropdown;
}

$ = bsDropdown.init($);
$ = bsMultiselect.init($);

/* this is our exported React class */
class MultiSelect extends React.Component {
	constructor(props) {
		super(props);

		this.$multiselect = null;
		this.options = getOptions();
	}

	syncData() {
		// this function is meant to be called from parent component