From 373854be4614b92745e72014ff66a0d1ea431087 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Mon, 16 Dec 2024 17:57:05 -0500 Subject: [PATCH] assistant2: Uniquely identify remove buttons on `ContextPill`s (#22115) This PR ensures that the remove buttons on the `ContextPill`s are uniquely identified. Release Notes: - N/A --- crates/assistant2/src/ui/context_pill.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/assistant2/src/ui/context_pill.rs b/crates/assistant2/src/ui/context_pill.rs index aa27e82b273355e7671d1f98d260643999fee1c9..d2f020a582e31dbf879384e5f5221a899f88b023 100644 --- a/crates/assistant2/src/ui/context_pill.rs +++ b/crates/assistant2/src/ui/context_pill.rs @@ -39,7 +39,7 @@ impl RenderOnce for ContextPill { .child(Label::new(self.context.name.clone()).size(LabelSize::Small)) .when_some(self.on_remove, |parent, on_remove| { parent.child( - IconButton::new("remove", IconName::Close) + IconButton::new(("remove", self.context.id.0), IconName::Close) .shape(IconButtonShape::Square) .icon_size(IconSize::XSmall) .on_click({