LC-select icon indicating copy to clipboard operation
LC-select copied to clipboard

transfering custom data attributes

Open largo17 opened this issue 2 years ago • 1 comments

Hi, i am using your plugin on one of my projects.
I used to use a styled UL with custom JS code to achieve a similar effect but I was missing accessibility and arrows to navigate the options so I am migrating to LC-select. In my original code, I have nested options ( think of a folder subtree)... for that and in order to style, I was giving a data-indentation attribute to each li.
When using your plugin, this custom attribute is understandably, not transferred to the

Thanks in advance...

largo17 avatar Jun 28 '23 17:06 largo17

You can achieve custom styling by using CSS to apply indentation to your options. While LC-select might not have a direct attribute for indentation, you can use classes or other attributes to target and style your options accordingly. For example:

.lc-select-option[data-indentation="1"] { padding-left: 10px; }

.lc-select-option[data-indentation="2"] { padding-left: 20px; }

** If the data-indentation attribute is a feature you believe would enhance LC-select, you could consider reaching out to the developers of the library to request such a feature or even contribute to the project by adding it yourself. **

abhinavashish15 avatar Aug 26 '23 14:08 abhinavashish15