lcdsantos / lcdsantos/jQuery-Selectric
wrapper remains camelCase even with option camelCase = false
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 715
- Forks
- 149
- PR merge metrics
- No merged PRs in 30d
Description
First - thank you very much for this insanely well written plugin. I am very satisfied.
One issue I encountered when renaming the "pluginName" to a camelCase name, like "mySelect", all css sub-classes are well transformed to "my-select", with exception of the wrapper. So one must rename the selector in the some selectors in the css (.selectric, .selectric .label, etc.) still to ".mySelect", even when ".my-select" is wanted according to the option customClass.camelCase = false.
That's an easy fix.
Change line 347 from:
classesObj.prefix = customClass.prefix;
To:
classesObj.prefix = customClass.camelCase ? customClass.prefix : _this.utils.toDash(customClass.prefix);
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at line 347, where classesObj.prefix is assigned, and inspect how customClass.camelCase and utils.toDash are used for the other CSS class names. The issue is done when the wrapper selector uses the dashed prefix when camelCase is false, while preserving the existing prefix when it is true.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100