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

selectedClass not being added with custom icon set #82

Open
cocowalla opened this issue Apr 14, 2019 · 0 comments
Open

selectedClass not being added with custom icon set #82

cocowalla opened this issue Apr 14, 2019 · 0 comments

Comments

@cocowalla
Copy link

cocowalla commented Apr 14, 2019

I'm using a custom icon set, which is a subset of Font Awesome 5, and contains both "regular" and "brand" icons, so I can't use iconClass. I'm initialising the iconpicker like this:

$("#my-iconpicker").iconpicker({
    footer: false,
    header: false,
    align: "left",
    cols: 12,
    icon: "",
    iconset: {
        iconClass: "",
        iconClassFix: "",
        icons: [
            "empty",
            "far fa-globe",
            "fab fa-windows",
            "fab fa-linux",
            "far fa-desktop",
            "far fa-server"
        ]
    },
    rows: 2,
    search: false,
    selectedClass: "btn-success",
    unselectedClass: ""
});

The problem is that when selecting an icon, the btn-success class isn't being added. Note that is is added if the empty option is selected, so I believe it's related to there being spaces in the icon names.

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

1 participant