You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
content="I updated your account with those settings. You're ready to set up your first dashboard! Click a button and then click outside the message - notice the selection persists."
Copy file name to clipboardExpand all lines: packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,20 @@ Once the component has rendered, user interactions will take precedence over the
108
108
109
109
```
110
110
111
+
### Message actions persistent selections
112
+
113
+
By default, message actions will automatically deselect when you click outside the component or on a different action button. To persist the selection instead, set `persistActionSelection` to `true`.
114
+
115
+
When `persistActionSelection` is `true`:
116
+
117
+
- The selected action will remain selected even when you click outside the component.
118
+
- Clicking a different button will still switch the selection to that button.
119
+
- Clicking the same action button again will toggle the selection off, though you will have to move your focus elsewhere to see the visual state change.
120
+
121
+
```js file="./MessageWithPersistedActions.tsx"
122
+
123
+
```
124
+
111
125
### Custom message actions
112
126
113
127
Beyond the standard message actions (good response, bad response, copy, share, or listen), you can add custom actions to a bot message by passing an `actions` object to the `<Message>` component. This object can contain the following customizations:
0 commit comments