@danielgindi/selectbox 1.0.47 → 1.0.48
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.cjs.js +45 -1
- package/dist/lib.cjs.js.map +1 -1
- package/dist/lib.cjs.min.js +2 -2
- package/dist/lib.cjs.min.js.map +1 -1
- package/dist/lib.es6.js +45 -1
- package/dist/lib.es6.js.map +1 -1
- package/dist/lib.es6.min.js +2 -2
- package/dist/lib.es6.min.js.map +1 -1
- package/dist/lib.umd.js +45 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/lib.umd.min.js +2 -2
- package/dist/lib.umd.min.js.map +1 -1
- package/lib/DropList.js +44 -0
- package/package.json +1 -1
- package/vue/DropList.vue +21 -0
- package/vue/SelectBox.vue +10 -0
package/dist/lib.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @danielgindi/selectbox 1.0.
|
|
2
|
+
* @danielgindi/selectbox 1.0.48
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -5944,6 +5944,50 @@
|
|
|
5944
5944
|
return this;
|
|
5945
5945
|
}
|
|
5946
5946
|
|
|
5947
|
+
/**
|
|
5948
|
+
*
|
|
5949
|
+
* @property {function(item: DropList.ItemBase, itemEl: Element):(*|false)} [fn] Function to call when rendering an item element
|
|
5950
|
+
* @returns {DropList}
|
|
5951
|
+
*/ }, { key: "setRenderItem", value:
|
|
5952
|
+
function setRenderItem(fn) {
|
|
5953
|
+
var p = this._p;
|
|
5954
|
+
p.renderItem = fn;
|
|
5955
|
+
return this;
|
|
5956
|
+
}
|
|
5957
|
+
|
|
5958
|
+
/**
|
|
5959
|
+
*
|
|
5960
|
+
* @property {function(item: DropList.ItemBase, itemEl: Element)} [fn] Function to call when rendering an item element
|
|
5961
|
+
* @returns {DropList}
|
|
5962
|
+
*/ }, { key: "setUnrenderItem", value:
|
|
5963
|
+
function setUnrenderItem(fn) {
|
|
5964
|
+
var p = this._p;
|
|
5965
|
+
|
|
5966
|
+
p.unrenderItem = fn;
|
|
5967
|
+
|
|
5968
|
+
if (typeof p.unrenderItem === 'function') {
|
|
5969
|
+
var _fn = p.unrenderItem;
|
|
5970
|
+
p.virtualListHelper.setOnItemUnrender(function (el) {
|
|
5971
|
+
try {
|
|
5972
|
+
_fn(el[ItemSymbol$1][ItemSymbol$1], el);
|
|
5973
|
+
} catch (err) {console.error(err);} // eslint-disable-line no-console
|
|
5974
|
+
delete el[ItemSymbol$1];
|
|
5975
|
+
|
|
5976
|
+
if (p.focusItemEl === el)
|
|
5977
|
+
p.focusItemEl = null;
|
|
5978
|
+
});
|
|
5979
|
+
} else {
|
|
5980
|
+
p.virtualListHelper.setOnItemUnrender(function (el) {
|
|
5981
|
+
delete el[ItemSymbol$1];
|
|
5982
|
+
|
|
5983
|
+
if (p.focusItemEl === el)
|
|
5984
|
+
p.focusItemEl = null;
|
|
5985
|
+
});
|
|
5986
|
+
}
|
|
5987
|
+
|
|
5988
|
+
return this;
|
|
5989
|
+
}
|
|
5990
|
+
|
|
5947
5991
|
/**
|
|
5948
5992
|
* @param {string} prop
|
|
5949
5993
|
* @returns {DropList}
|