MCPcopy Create free account
hub / github.com/TruthHun/BookStack / addDivider

Function addDivider

static/bootstrap-select-1.13.18/js/bootstrap-select.js:1509–1525  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

1507 var selectOptions = this.$element[0].querySelectorAll('select > *' + optionSelector);
1508
1509 function addDivider (config) {
1510 var previousData = mainData[mainData.length - 1];
1511
1512 // ensure optgroup doesn't create back-to-back dividers
1513 if (
1514 previousData &&
1515 previousData.type === 'divider' &&
1516 (previousData.optID || config.optID)
1517 ) {
1518 return;
1519 }
1520
1521 config = config || {};
1522 config.type = 'divider';
1523
1524 mainData.push(config);
1525 }
1526
1527 function addOption (option, config) {
1528 config = config || {};

Callers 2

addOptionFunction · 0.85
addOptgroupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected