Skip to content

Commit

Permalink
fix: cklicking a "tag" tries to submit a form
Browse files Browse the repository at this point in the history
  • Loading branch information
saemideluxe committed Sep 28, 2021
1 parent a82958f commit 56e97a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bread/layout/components/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

class Tag(hg.BUTTON):
def __init__(self, *label, can_delete=False, tag_color=None, **kwargs):
kwargs.setdefault(
"type", "button"
) # prevents this from trying to submit a form when inside a FORM element
kwargs["_class"] = (
kwargs.get("_class", "")
+ " bx--tag"
Expand Down

0 comments on commit 56e97a0

Please sign in to comment.