@danielgindi/selectbox 2.0.32 → 2.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 2.0.32
2
+ * @danielgindi/selectbox 2.0.34
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  (function (global, factory) {
@@ -10353,7 +10353,7 @@
10353
10353
  * @returns {boolean}
10354
10354
  */
10355
10355
  isReadOnly() {
10356
- return !this._p.readOnly;
10356
+ return this._p.readOnly;
10357
10357
  }
10358
10358
 
10359
10359
  /**
@@ -13173,16 +13173,20 @@
13173
13173
 
13174
13174
  let group = [],stickyGroup = null;
13175
13175
  let groups = [group];
13176
+ let inGroup = false;
13176
13177
  const selectedValuesSet = new Set(p.selectedValues);
13177
13178
  let item, i, len;
13178
13179
 
13179
13180
  // Split to groups
13180
13181
  for (i = 0, len = items.length; i < len; i++) {
13181
13182
  item = items[i];
13182
- if (item._group && group.length) {
13183
+
13184
+ if (item._group && group.length || inGroup && !item._group && !item._child) {
13185
+ inGroup = !!item._group;
13183
13186
  group = [];
13184
13187
  groups.push(group);
13185
13188
  }
13189
+
13186
13190
  group.push(item);
13187
13191
  }
13188
13192