@vendorflow/components 2.0.34 → 2.0.35

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.
@@ -93,7 +93,7 @@ function useInfiniteScroll(_a) {
93
93
  }
94
94
  // this callback is used and fired based on the state of the element it is attached to
95
95
  return (0, react_2.useCallback)(function (node) {
96
- if (isFetching) {
96
+ if (isLoading || isFetching) {
97
97
  return;
98
98
  }
99
99
  if (observer.current) {
@@ -120,6 +120,6 @@ function useInfiniteScroll(_a) {
120
120
  }
121
121
  observer.current.observe(node);
122
122
  }
123
- }, [isFetching, isReverse, hasNextPage, fetchNextPage, scrollParent, scrollBody]);
123
+ }, [isLoading, isFetching, isReverse, hasNextPage, fetchNextPage, scrollParent, scrollBody]);
124
124
  }
125
125
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -134,7 +134,7 @@ function ChatInterface() {
134
134
  setTimeout(function () {
135
135
  setMessages(__spreadArray(__spreadArray([], __read(messages), false), __read(generateMessagePage()), false));
136
136
  setFetching(false);
137
- }, 2000);
137
+ }, 20);
138
138
  }
139
139
  function handleSend(message) {
140
140
  setSubmitting(true);
@@ -154,7 +154,7 @@ function ChatInterface() {
154
154
  }, 500);
155
155
  });
156
156
  }
157
- return ((0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid #ededed;\n height: 20rem;\n "], ["\n border: 1px solid #ededed;\n height: 20rem;\n "]))) },
157
+ return ((0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid #ededed;\n height: 30rem;\n "], ["\n border: 1px solid #ededed;\n height: 30rem;\n "]))) },
158
158
  (0, react_1.jsx)(ChatInterface_1.default, { userId: "user1", messages: messages, handleSend: handleSend, submitting: submitting, fetchNextPage: loadMore, hasNextPage: hasMore, isLoading: isLoading, isFetching: isFetching })));
159
159
  }
160
160
  exports.ChatInterface = ChatInterface;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendorflow/components",
3
- "version": "2.0.34",
3
+ "version": "2.0.35",
4
4
  "description": "React components for vendorflow",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",