How to target wrapper div of select element in a module
See original GitHub issueI’m writing a Tailwind-based module for formio.js, and I’m having trouble targeting the wrapper div for a <select>
element. I’ve attached a screenshot showing the markup output by formio.js without a module used; the element I’m attempting to modify is the div with a formio-choices
class name. I’d like to figure out how to alter the rendering of this element so I can add/remove class names.
Any guidance on how to target that element from my module would be extremely appreciated!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
javascript - Select elements filtering them if they belong to nested ...
I want to select elements that have class target. This is what I am using to do so, $(.container).find('.target); But, the problem is...
Read more >target - CSS: Cascading Style Sheets - MDN Web Docs
The :target CSS pseudo-class represents a unique element (the target element) with an id matching the URL's fragment.
Read more >Lesson 1: Understanding ID and Class in CSS
Activities · Open your portfolio's index. · Review the content of your page. · Notice how many <div> elements there are. · The...
Read more >Select Page Elements | Basic Guides - TestCafe
Pass a CSS selector string or a client-side function to the Selector constructor to create a selector. import { Selector } from 'testcafe';...
Read more >CSS - Its All About Understanding Selectors - mojoPortal
div h2 {} - Select all h2 elements that are within a div. ... Html Content feature on a page it will have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you go to next.form.io, add a Select component and go to the “Data” tab you will see Choices options as a configuration option. That’s the main way to set these right now. To do it programmatically would involve extending the Select component and overriding the defaults. We would be open to making it more customizable though.
Thanks, @randallknutson. Turns out my syntax was just off; for the sake of posterity here’s an example of what works: