lcdsantos / lcdsantos/jQuery-Selectric

wrapper remains camelCase even with option camelCase = false

Open
#235 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.