bhd-components 0.11.16 → 0.11.18

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.
@@ -143,11 +143,18 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
143
143
  return item;
144
144
  });
145
145
  });
146
+ recordRef.current.dataSource = recordRef.current.dataSource.map((item)=>{
147
+ if (item.id == id) {
148
+ return _object_spread({}, item, obj);
149
+ }
150
+ return item;
151
+ });
146
152
  },
147
153
  clearInputing () {
148
154
  setDataSource((data)=>{
149
155
  return data.filter((item)=>item.id !== "inputing");
150
156
  });
157
+ recordRef.current.dataSource = recordRef.current.dataSource.filter((item)=>item.id !== "inputing");
151
158
  },
152
159
  recordMsg: (msg)=>{
153
160
  onRecordMessage(msg);
@@ -164,9 +171,16 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
164
171
  return item;
165
172
  });
166
173
  });
174
+ recordRef.current.dataSource = recordRef.current.dataSource.map((item)=>{
175
+ if (item.id == id) {
176
+ return _object_spread({}, item, obj);
177
+ }
178
+ return item;
179
+ });
167
180
  },
168
181
  changeDataSource: (data)=>{
169
182
  setDataSource(data);
183
+ recordRef.current.dataSource = data;
170
184
  },
171
185
  scrollToBottom,
172
186
  setSendingId: (id)=>{
@@ -275,14 +289,14 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
275
289
  const scrollToBottom = ()=>{
276
290
  if (!virtuosoRef.current) return;
277
291
  if (isAutoScrollRef.current && !userScrolledUpRef.current) {
278
- timerRef.current.scrollTimer = setTimeout(()=>{
279
- virtuosoRef.current.scrollToIndex({
280
- index: "LAST",
281
- align: "end",
282
- behavior: "auto",
283
- offset: scrollOffset
284
- });
285
- }, 100);
292
+ // timerRef.current.scrollTimer = setTimeout(() => {
293
+ virtuosoRef.current.scrollToIndex({
294
+ index: "LAST",
295
+ align: "end",
296
+ behavior: "auto",
297
+ offset: scrollOffset
298
+ });
299
+ // }, 100);
286
300
  }
287
301
  };
288
302
  const getData = (page, pageSize)=>{
@@ -75,6 +75,7 @@
75
75
  gap: 16px;
76
76
  font-size: 14px;
77
77
  color: rgba(0, 0, 0, 0.25);
78
+ white-space: nowrap;
78
79
  &:before {
79
80
  content: "";
80
81
  display: block;
@@ -149,6 +149,12 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
149
149
  return item;
150
150
  });
151
151
  });
152
+ recordRef.current.dataSource = recordRef.current.dataSource.map(function(item) {
153
+ if (item.id == id) {
154
+ return _object_spread({}, item, obj);
155
+ }
156
+ return item;
157
+ });
152
158
  },
153
159
  clearInputing: function clearInputing() {
154
160
  setDataSource(function(data) {
@@ -156,6 +162,9 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
156
162
  return item.id !== "inputing";
157
163
  });
158
164
  });
165
+ recordRef.current.dataSource = recordRef.current.dataSource.filter(function(item) {
166
+ return item.id !== "inputing";
167
+ });
159
168
  },
160
169
  recordMsg: function(msg) {
161
170
  onRecordMessage(msg);
@@ -172,9 +181,16 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
172
181
  return item;
173
182
  });
174
183
  });
184
+ recordRef.current.dataSource = recordRef.current.dataSource.map(function(item) {
185
+ if (item.id == id) {
186
+ return _object_spread({}, item, obj);
187
+ }
188
+ return item;
189
+ });
175
190
  },
176
191
  changeDataSource: function(data) {
177
192
  setDataSource(data);
193
+ recordRef.current.dataSource = data;
178
194
  },
179
195
  scrollToBottom: scrollToBottom,
180
196
  setSendingId: function(id) {
@@ -280,14 +296,14 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
280
296
  var scrollToBottom = function() {
281
297
  if (!virtuosoRef.current) return;
282
298
  if (isAutoScrollRef.current && !userScrolledUpRef.current) {
283
- timerRef.current.scrollTimer = setTimeout(function() {
284
- virtuosoRef.current.scrollToIndex({
285
- index: "LAST",
286
- align: "end",
287
- behavior: "auto",
288
- offset: scrollOffset
289
- });
290
- }, 100);
299
+ // timerRef.current.scrollTimer = setTimeout(() => {
300
+ virtuosoRef.current.scrollToIndex({
301
+ index: "LAST",
302
+ align: "end",
303
+ behavior: "auto",
304
+ offset: scrollOffset
305
+ });
306
+ // }, 100);
291
307
  }
292
308
  };
293
309
  var getData = function(page, pageSize) {
@@ -75,6 +75,7 @@
75
75
  gap: 16px;
76
76
  font-size: 14px;
77
77
  color: rgba(0, 0, 0, 0.25);
78
+ white-space: nowrap;
78
79
  &:before {
79
80
  content: "";
80
81
  display: block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.11.16",
3
+ "version": "0.11.18",
4
4
  "description": "组件功能描述",
5
5
  "config": {
6
6
  "commitizen": {