Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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();
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