-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
color-selector onSelectColor not fired #1908
Comments
Try updating Metro to the latest version. |
Hi Serhii,
thanks for answering.
I don't think updating solve the issue: there's something I don't understand. Looking at the code of the component, I see that in both versions (the one I'm currently using at the last one) the following 2 lines of code are present in the 'ColorSelectorDefaultConfig':
onSelectColor: Metro.noop,
onColorSelectorCreate: Metro.noop
I'm currently not able to find the definition of Metro.noop, anyway I guess it is a way not to define a function related to the event. Am I completely wrong?
Anyway I tried to associate a function to the event in my HTML:
<div id="colorSelector" data-role="color-selector" data-show-values="hex,rgb" onSelectColor="onColorSelected"></div>
But it is never fired.
So far, the only way to do what I need, is adding a button that use the val() method provided by the component to get the selected color. It is not my favorite solution (I would like to automatically do this by simply selecting a color and raising consequently an event) but could be ok for my purpose.
Best regards,
Francesco
Da: Serhii Pimenov ***@***.***>
Inviato: lunedì 19 giugno 2023 13:15
A: olton/Metro-UI-CSS ***@***.***>
Cc: Francesco ***@***.***>; Author ***@***.***>
Oggetto: Re: [olton/Metro-UI-CSS] color-selector onSelectColor not fired (Issue #1908)
Try updating Metro to the latest version.
-
Reply to this email directly, view it on GitHub<#1908 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFCO3L6LMRVBFLVSPDP7XZTXMAYDFANCNFSM6AAAAAAZLYT36M>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Check attribute data-on-select-color |
This is really embarassing......
I used several times this way of writing events in HTML with your library but this time I didn't realize how I was wrong in this piece of HTML....thanks for your help!
Francesco
Da: Serhii Pimenov ***@***.***>
Inviato: lunedì 19 giugno 2023 14:22
A: olton/Metro-UI-CSS ***@***.***>
Cc: Francesco ***@***.***>; Author ***@***.***>
Oggetto: Re: [olton/Metro-UI-CSS] color-selector onSelectColor not fired (Issue #1908)
Check attribute data-on-select-color
-
Reply to this email directly, view it on GitHub<#1908 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFCO3L4MXWF4DMPT3Z7XTODXMBAALANCNFSM6AAAAAAZLYT36M>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I select a color in color selector, no event is fired, so I don't know how to automatically process the color change
The text was updated successfully, but these errors were encountered: