shineout 1.12.20 → 1.12.21
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/css/AnimationList/AbsoluteList.js +3 -1
- package/css/Select/OptionList.js +10 -2
- package/css/Select/Select.js +1 -0
- package/css/index.d.ts +1 -1
- package/css/index.js +1 -1
- package/dist/shineout.js +470 -364
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/es/AnimationList/AbsoluteList.js +3 -1
- package/es/Select/OptionList.js +10 -2
- package/es/Select/Select.js +1 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/AnimationList/AbsoluteList.js +3 -1
- package/lib/Select/OptionList.js +10 -2
- package/lib/Select/Select.js +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/css/Select/OptionList.js
CHANGED
|
@@ -164,7 +164,9 @@ function (_Component) {
|
|
|
164
164
|
var _this$props2 = this.props,
|
|
165
165
|
data = _this$props2.data,
|
|
166
166
|
itemsInView = _this$props2.itemsInView,
|
|
167
|
-
lineHeight = _this$props2.lineHeight
|
|
167
|
+
lineHeight = _this$props2.lineHeight,
|
|
168
|
+
autoAdapt = _this$props2.autoAdapt,
|
|
169
|
+
resetPosition = _this$props2.resetPosition;
|
|
168
170
|
var fullHeight = itemsInView * lineHeight;
|
|
169
171
|
var contentHeight = data.length * lineHeight - h;
|
|
170
172
|
var scrollTop = h > fullHeight ? 0 : y;
|
|
@@ -189,6 +191,10 @@ function (_Component) {
|
|
|
189
191
|
scrollTop: scrollTop,
|
|
190
192
|
currentIndex: index
|
|
191
193
|
});
|
|
194
|
+
|
|
195
|
+
if (autoAdapt && resetPosition) {
|
|
196
|
+
resetPosition(autoAdapt);
|
|
197
|
+
}
|
|
192
198
|
};
|
|
193
199
|
|
|
194
200
|
_proto.handleHover = function handleHover(index, force) {
|
|
@@ -326,7 +332,9 @@ OptionList.propTypes = {
|
|
|
326
332
|
filterText: _propTypes.default.string,
|
|
327
333
|
hideCreateOption: _propTypes.default.bool,
|
|
328
334
|
emptyText: _propTypes.default.node,
|
|
329
|
-
renderOptionList: _propTypes.default.func
|
|
335
|
+
renderOptionList: _propTypes.default.func,
|
|
336
|
+
autoAdapt: _propTypes.default.bool,
|
|
337
|
+
resetPosition: _propTypes.default.func
|
|
330
338
|
};
|
|
331
339
|
var _default = OptionList;
|
|
332
340
|
exports.default = _default;
|
package/css/Select/Select.js
CHANGED
|
@@ -634,6 +634,7 @@ function (_PureComponent) {
|
|
|
634
634
|
};
|
|
635
635
|
return _react.default.createElement(List, (0, _extends2.default)({}, props, {
|
|
636
636
|
style: style,
|
|
637
|
+
autoAdapt: autoAdapt,
|
|
637
638
|
rootClass: (0, _styles.selectClass)(position, (0, _config.isRTL)() && 'rtl'),
|
|
638
639
|
autoClass: (0, _styles.selectClass)(autoAdapt && 'auto-adapt'),
|
|
639
640
|
bindOptionFunc: this.bindOptionFunc,
|
package/css/index.d.ts
CHANGED