8000 fix: pass attributes through in BDropdownItemButton by dword-design-honestly · Pull Request #2143 · bootstrap-vue-next/bootstrap-vue-next · GitHub
[go: up one dir, main page]

Skip to content

fix: pass attributes through in BDropdownItemButton #2143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

dword-design-honestly
Copy link
Contributor
@dword-design-honestly dword-design-honestly commented Aug 23, 2024

Describe the PR

Currently, attributes passed to BDropdownItemButton are swallowed. But we want to add them to the list element like it was in BootstrapVue.

PR checklist

What kind of change does this PR introduce? (check at least one)

  • Bugfix 🐛 - fix(...)
  • Feature - feat(...)
  • ARIA accessibility - fix(...)
  • Documentation update - docs(...)
  • Other (please describe)

The PR fulfills these requirements:

  • Pull request title and all commits follow the Conventional Commits convention or has an override in this pull request body This is very important, as the CHANGELOG is generated from these messages, and determines the next version type. Pull requests that do not follow conventional commits or do not have an override will be denied

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Member
@VividLemon VividLemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to other components the class attribute gets applied to the li and the rest of the attrs get applied to the button

inherit attrs is still probably needed here, but you likely should do

const { class: wrapperClass, ...attrs } = useAttrs()

<li :class="wrapperClass"> <button v-bind="attrs>

Similar to other components that implement this, buttonClass is (already implemented) and applies to the button, but we should also add wrapperAttrs to v-bind to the li component.

(Searching for usages of useAttrs should point you in the direction of the standard implementation for components like this)

Reference:
image

@dword-design-honestly
Copy link
Contributor Author

@VividLemon Did the changes like suggested 👍.

@VividLemon VividLemon merged commit 951bbf0 into bootstrap-vue-next:main Aug 27, 2024
3 checks passed
@github-actions github-actions bot mentioned this pull request Aug 26, 2024
@dword-design-honestly dword-design-honestly deleted the patch-2 branch August 28, 2024 07:30
@dword-design-honestly
Copy link
Contributor Author

@VividLemon Can we have a version published since this is blocking us shipping sth.? 😊

xvaara added a commit to xvaara/bootstrap-vue-next that referenced this pull request Sep 11, 2024
* upstream/main: (179 commits)
  chore: release main (bootstrap-vue-next#2175)
  docs(BImg): Parity pass (bootstrap-vue-next#2177)
  docs: Use Not Yet Implemented Component consistently (bootstrap-vue-next#2183)
  docs(BCarousel): Parity pass (bootstrap-vue-next#2179)
  feat(BCarousel): add click:prev and click:next events
  refactor: reduce module packages complexity
  refactor: make define models use component imported prop type
  fix directives on element update during interaction (bootstrap-vue-next#2170)
  fix(BTabs): fix recursion on titleLinkAttrs (bootstrap-vue-next#2169)
  chore: release main (bootstrap-vue-next#2172)
  fix(BPagination): hide-goto-end doesn't hide firstPage or lastPage (bootstrap-vue-next#2171)
  Update vite template for bugs to work now that it seems we don't import components
  docs(BCard): Parity pass (bootstrap-vue-next#2168)
  docs(BPagination): Update Component refs & clean up documentation (bootstrap-vue-next#2152)
  Delete .github/workflows/pkg-pr-new.yaml
  Update ci.yaml with pkg.pr.new
  add pkg.pr.new to publish a package for each commit and pull request
  chore: release main (bootstrap-vue-next#2149)
  fix(BPagination): Get rid of bad binding on li (bootstrap-vue-next#2150)
  fix: pass attributes through in BDropdownItemButton (bootstrap-vue-next#2143)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0