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

Select data-icon left #5797

Open
shmshd opened this issue Apr 4, 2018 · 2 comments
Open

Select data-icon left #5797

shmshd opened this issue Apr 4, 2018 · 2 comments

Comments

@shmshd
Copy link

shmshd commented Apr 4, 2018

Select data-icon to left doesn't seem to work as expected. With or without class left it is always at right.
This issue exist in 1.0.0-alpha.4 & 1.0.0-beta.

@iFreedive
Copy link

I have also noticed this, the circle also seems to have no effect.

@borg1980
Copy link

borg1980 commented Apr 12, 2018

It looks like a small oversight in beta version code - script gets class attribute but don't use it.

It looks like this:

    var iconUrl = option.getAttribute('data-icon');
    var classes = option.getAttribute('class');
    if (!!iconUrl) {
      var imgEl = $('<img alt="" src="' + iconUrl + '">');
      liEl.prepend(imgEl);
    }

It could look like this to work properly:

    var iconUrl = option.getAttribute('data-icon');
    var classes = option.getAttribute('class');
    if (!!iconUrl) {
      var imgEl = $('<img alt=""' +  (classes ? ' class="' + classes + '"' : '') + ' src="' + iconUrl + '">');
      liEl.prepend(imgEl);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants