bhd-components 0.10.29 → 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.
@@ -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
- virtuosoRef.current.scrollToIndex({
212
- index: "LAST",
213
- align: "end",
214
- behavior: "auto"
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);
@@ -681,6 +680,7 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
681
680
  ref: wrapperRef,
682
681
  children: /*#__PURE__*/ _jsx(Virtuoso, {
683
682
  ref: virtuosoRef,
683
+ totalCount: dataSource.length,
684
684
  style: {
685
685
  height: "100%"
686
686
  },
@@ -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
- virtuosoRef.current.scrollToIndex({
217
- index: "LAST",
218
- align: "end",
219
- behavior: "auto"
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);
@@ -662,6 +659,7 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
662
659
  ref: wrapperRef,
663
660
  children: /*#__PURE__*/ _jsx(Virtuoso, {
664
661
  ref: virtuosoRef,
662
+ totalCount: dataSource.length,
665
663
  style: {
666
664
  height: "100%"
667
665
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.10.29",
3
+ "version": "0.10.31",
4
4
  "description": "组件功能描述",
5
5
  "config": {
6
6
  "commitizen": {