r-dropdown-button
Advanced tools
Comparing version 3.1.2 to 3.1.3
64
index.js
@@ -502,5 +502,3 @@ "use strict"; | ||
style.width = buttonLimit.width; | ||
} else if (dropdownType === 'center') { | ||
style.left = "calc(50% - ".concat(popupLimit.width / 2, "px)"); | ||
} else if (rtl) { | ||
} else if (dropdownType === 'center') {} else if (rtl) { | ||
right = buttonLimit.right; | ||
@@ -525,5 +523,3 @@ left = right - popupLimit.width; | ||
if (dropdownType === 'center') { | ||
style.top = "calc(50% - ".concat(popupLimit.height / 2, "px)"); | ||
} else if (bottom > parentLimit.bottom) { | ||
if (dropdownType === 'center') {} else if (bottom > parentLimit.bottom) { | ||
if (popupLimit.height > buttonLimit.top - parentLimit.top) { | ||
@@ -564,6 +560,20 @@ style.top = parentLimit.bottom - popupLimit.height; | ||
value: function getStyle() { | ||
var rtl = this.context.rtl; | ||
return { | ||
var _this$context2 = this.context, | ||
rtl = _this$context2.rtl, | ||
dropdownType = _this$context2.dropdownType; | ||
var style = { | ||
direction: rtl ? 'rtl' : 'ltr' | ||
}; | ||
if (dropdownType === 'center') { | ||
style.left = 0; | ||
style.top = 0; | ||
style.width = '100%'; | ||
style.height = '100%'; | ||
style.display = 'flex'; | ||
style.alignItems = 'center'; | ||
style.justifyContent = 'center'; | ||
} | ||
return style; | ||
} | ||
@@ -646,13 +656,13 @@ }, { | ||
var _this$context2 = this.context, | ||
search = _this$context2.search, | ||
items = _this$context2.items, | ||
toggle = _this$context2.toggle, | ||
getValue = _this$context2.getValue, | ||
rtl = _this$context2.rtl, | ||
hover = _this$context2.hover, | ||
popupClassName = _this$context2.popupClassName, | ||
searchValue = _this$context2.searchValue, | ||
SetState = _this$context2.SetState, | ||
placeHolder = _this$context2.placeHolder; | ||
var _this$context3 = this.context, | ||
search = _this$context3.search, | ||
items = _this$context3.items, | ||
toggle = _this$context3.toggle, | ||
getValue = _this$context3.getValue, | ||
rtl = _this$context3.rtl, | ||
hover = _this$context3.hover, | ||
popupClassName = _this$context3.popupClassName, | ||
searchValue = _this$context3.searchValue, | ||
SetState = _this$context3.SetState, | ||
placeHolder = _this$context3.placeHolder; | ||
var popupStyle = getValue(this.context.popupStyle); | ||
@@ -761,10 +771,10 @@ return /*#__PURE__*/_react.default.createElement("div", { | ||
index = _this$props5.index; | ||
var _this$context3 = this.context, | ||
getValue = _this$context3.getValue, | ||
getIcon = _this$context3.getIcon, | ||
itemClick = _this$context3.itemClick, | ||
_this$context3$gap = _this$context3.gap, | ||
gap = _this$context3$gap === void 0 ? 8 : _this$context3$gap, | ||
rtl = _this$context3.rtl, | ||
checkField = _this$context3.checkField; | ||
var _this$context4 = this.context, | ||
getValue = _this$context4.getValue, | ||
getIcon = _this$context4.getIcon, | ||
itemClick = _this$context4.itemClick, | ||
_this$context4$gap = _this$context4.gap, | ||
gap = _this$context4$gap === void 0 ? 8 : _this$context4$gap, | ||
rtl = _this$context4.rtl, | ||
checkField = _this$context4.checkField; | ||
var disabled = getValue(item.disabled); | ||
@@ -771,0 +781,0 @@ var text = getValue(item.text); |
{ | ||
"name": "r-dropdown-button", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
35647
1034