diff --git a/.changeset/modern-shirts-kneel.md b/.changeset/modern-shirts-kneel.md new file mode 100644 index 0000000..04625da --- /dev/null +++ b/.changeset/modern-shirts-kneel.md @@ -0,0 +1,5 @@ +--- +"reacord": patch +--- + +ensure action rows handle child interactions diff --git a/packages/reacord/library/core/components/action-row.tsx b/packages/reacord/library/core/components/action-row.tsx index a30b6c2..bad0f41 100644 --- a/packages/reacord/library/core/components/action-row.tsx +++ b/packages/reacord/library/core/components/action-row.tsx @@ -2,6 +2,7 @@ import type { ReactNode } from "react" import { ReacordElement } from "../../internal/element.js" import type { MessageOptions } from "../../internal/message" import { Node } from "../../internal/node.js" +import type { ComponentInteraction } from "../../internal/interaction.js" /** * Props for an action row @@ -44,4 +45,12 @@ class ActionRowNode extends Node { child.modifyMessageOptions(options) } } + handleComponentInteraction(interaction: ComponentInteraction) { + for (const child of this.children) { + if (child.handleComponentInteraction(interaction)) { + return true + } + } + return false + } }