Skip to content

Conversation

@anrolmar
Copy link
Contributor

Describe the PR

  • Added optionAttrs on BFormSelect and BFormSelectOption to style the option elements

Small replication

If we want to set some styling for the option element, we could do:

<BFormSelect v-model="selected" :options="ex1Options" :options-attrs="{ style:'background: red; color: white'}" />

so the result would be

Captura de pantalla 2025-11-30 164249

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

@bolt-new-by-stackblitz
Copy link

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

@coderabbitai
Copy link

coderabbitai bot commented Nov 30, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

76 files out of 300 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Something appears to be messed up with your environment.

I'd recommend going into your github fork,
https://github.com/anrolmar/bootstrap-vue-next
Discard your commits and pull the upstream

Then on your local environment, git reset --hard ${hash}
Then write your changes again

That said, we don't want this optionsAttrs as a prop on BFormSelect, we want it in ex1Options (from your example)

So ex1Options might look like

type BFormSelectOptionsObject = Record<string, unknown>
const ex1Options: BFormSelectOptionsObject[] = [
   { attrs: { style:'background: red; color: white'} },
   { attrs: { style:'background: red; color: blue'} },
   { attrs: { style:'background: red; color: red'} },
]

That way each can independently be styled. Then on the BFormSelectOption do a simple v-bind="option.attrs"

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