bhd-components 0.10.30 → 0.10.31
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/index.esm.es5.development.js +7 -10
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +1 -1
- package/dist/vendor.esm.es5.production.js +1 -1
- package/es2017/AIMessageList/components/virtuosoList/index.js +7 -8
- package/esm/AIMessageList/components/virtuosoList/index.js +7 -10
- package/package.json +1 -1
|
@@ -201,18 +201,17 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
201
201
|
...list
|
|
202
202
|
];
|
|
203
203
|
});
|
|
204
|
-
setFirstItemIndex((num)=>num + 1);
|
|
205
|
-
// timerRef.current.scrollTimer = setTimeout(() => {
|
|
206
204
|
scrollToBottom();
|
|
207
|
-
// }, 100);
|
|
208
205
|
};
|
|
209
206
|
const scrollToBottom = ()=>{
|
|
210
207
|
if (!virtuosoRef.current || !autoScrollBottom.current) return;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
208
|
+
timerRef.current.scrollTimer = setTimeout(()=>{
|
|
209
|
+
virtuosoRef.current.scrollToIndex({
|
|
210
|
+
index: "LAST",
|
|
211
|
+
align: "end",
|
|
212
|
+
behavior: "auto"
|
|
213
|
+
});
|
|
214
|
+
}, 100);
|
|
216
215
|
};
|
|
217
216
|
const getData = (page, pageSize)=>{
|
|
218
217
|
setLoading(true);
|
|
@@ -204,20 +204,17 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
204
204
|
setDataSource(function(data) {
|
|
205
205
|
return _to_consumable_array(data).concat(_to_consumable_array(list));
|
|
206
206
|
});
|
|
207
|
-
setFirstItemIndex(function(num) {
|
|
208
|
-
return num + 1;
|
|
209
|
-
});
|
|
210
|
-
// timerRef.current.scrollTimer = setTimeout(() => {
|
|
211
207
|
scrollToBottom();
|
|
212
|
-
// }, 100);
|
|
213
208
|
};
|
|
214
209
|
var scrollToBottom = function() {
|
|
215
210
|
if (!virtuosoRef.current || !autoScrollBottom.current) return;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
211
|
+
timerRef.current.scrollTimer = setTimeout(function() {
|
|
212
|
+
virtuosoRef.current.scrollToIndex({
|
|
213
|
+
index: "LAST",
|
|
214
|
+
align: "end",
|
|
215
|
+
behavior: "auto"
|
|
216
|
+
});
|
|
217
|
+
}, 100);
|
|
221
218
|
};
|
|
222
219
|
var getData = function(page, pageSize) {
|
|
223
220
|
setLoading(true);
|