Skip to content
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

Setting the form-class on b-dropdown-form #4474

Closed
bbugh opened this issue Dec 9, 2019 · 1 comment · Fixed by #4475, mariazevedo88/hash-generator-js#24 or tghelere/CL#8
Closed

Setting the form-class on b-dropdown-form #4474

bbugh opened this issue Dec 9, 2019 · 1 comment · Fixed by #4475, mariazevedo88/hash-generator-js#24 or tghelere/CL#8

Comments

@bbugh
Copy link
Contributor

@bbugh bbugh commented Dec 9, 2019

Is your feature request related to a problem? Please describe...

We have a b-dropdown-form that needs to be a flex-wrap: nowrap, among other settings. There is currently no way to set the class on the form of the b-form-dropdown. Using class="special-form" adds the class to the wrapper li.

Describe the solution you'd like

The common pattern in these scenarios seems to be having a new property that affects the specific component, like form-class.

Happy to PR this if it's an acceptable idea.

Describe alternatives you've considered

We could use a selector to say .special-form > form but that's getting into library implementation details.

Additional context

https://bootstrap-vue.js.org/docs/components/dropdown/#comp-ref-b-dropdown-form-props

@tmorehouse

This comment has been minimized.

Copy link
Member

@tmorehouse tmorehouse commented Dec 9, 2019

The current workaround would be a custom style that targets the form element, but with scoped styles you would need the vue-loader deep selector:

<style scoped>
  .special-form /deep/ form {
    flex-wrap: nowrap;
  }
</style>

But a new prop form-class would allow you to place bootstrap utility classes on the form element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.