odaptos_design_system 1.4.142 → 1.4.144

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.
@@ -9196,6 +9196,16 @@ const Chat = ({
9196
9196
  return '<a href="' + hyperlink + '" target="_blank" rel="noopener noreferrer">' + url + '</a>';
9197
9197
  });
9198
9198
  };
9199
+ const messageEl = React.useRef(null);
9200
+ // AUTOSCROLL TO BOTTOM
9201
+ React.useEffect(() => {
9202
+ if (messageEl && messageEl.current && !isTaskMode) {
9203
+ messageEl.current.scrollIntoView({
9204
+ behavior: 'smooth',
9205
+ block: 'end'
9206
+ });
9207
+ }
9208
+ }, []);
9199
9209
  return /*#__PURE__*/React__default.createElement(Grid, Object.assign({
9200
9210
  container: true,
9201
9211
  item: true,
@@ -9294,6 +9304,12 @@ const Chat = ({
9294
9304
  size: "sm"
9295
9305
  })));else return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
9296
9306
  } else return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
9307
+ }), /*#__PURE__*/React__default.createElement("div", {
9308
+ style: {
9309
+ float: 'left',
9310
+ clear: 'both'
9311
+ },
9312
+ ref: messageEl
9297
9313
  }))), !isTaskMode && chatInputPlaceholder && typeof chatInputValue === 'string' && chatInputonChange && /*#__PURE__*/React__default.createElement(ChatInput, {
9298
9314
  placeholder: chatInputPlaceholder,
9299
9315
  value: chatInputValue,