Commit b130ad2
authored
feat(MessageBox): Implement Smart Scroll (#550)
Introduces an optional enableSmartScroll feature, which provides a smooth and user-friendly experience when interacting with dynamically updated content. The feature pauses scrolling when the user scrolls up and resumes when the user scrolls down or clicks the "back to bottom" button. Imperative methods (scrollToTop, scrollToBottom, are isSmartScrollActive) are exposed via ref to provide programmatic control over the scrolling behavior. The component will not scroll automatically unless the user scrolls to the bottom or uses the exposed methods. The user has full control over the scroll position. The scroll trigger (such as the number of messages) can also be modified.1 parent a0d169f commit b130ad2
File tree
5 files changed
+1121
-96
lines changed- packages/module
- patternfly-docs
- content/extensions/chatbot/examples/demos
- generated/patternfly-ai/chatbot/messages/demo
- src/MessageBox
5 files changed
+1121
-96
lines changedLines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
65 | 101 | | |
66 | 102 | | |
67 | 103 | | |
| |||
0 commit comments