agent: Fix instruction list item with multiple buttons not working (#30541)
This was a particular problem in the Amazon Bedrock section (at least for now) where there were multiple buttons and none of them actually worked because they all had the same id. Release Notes: - agent: Fixed Amazon Bedrock settings link buttons not working.
This commit is contained in:
@@ -38,8 +38,10 @@ impl IntoElement for InstructionListItem {
|
||||
(self.button_label, self.button_link)
|
||||
{
|
||||
let link = button_link.clone();
|
||||
let unique_id = SharedString::from(format!("{}-button", self.label));
|
||||
|
||||
h_flex().flex_wrap().child(Label::new(self.label)).child(
|
||||
Button::new("link-button", button_label)
|
||||
Button::new(unique_id, button_label)
|
||||
.style(ButtonStyle::Subtle)
|
||||
.icon(IconName::ArrowUpRight)
|
||||
.icon_size(IconSize::XSmall)
|
||||
|
||||
Reference in New Issue
Block a user