Hi!
I need fill the on click event in a label component but doesn't work only filling the config. I'm trying to put a hamburger button, but became very ugly, so I'm using the label instead.
Any suggestions?
Hi,
There is no built-in event available for the Label component. But you could add a native JS click event listener
Just add a ref
to make it easier to select
// Simple label element
new Label({
appendTo : document.body,
text : 'Simple label',
ref : 'label1'
});
document.querySelector('[data-ref="label1"]').addEventListener('click', () => {
console.log('click');
});
Hope this helps.
Please let us know if you have any other questions
Best regards,
Tasnim
Hey,
We'll discuss with the team, but I created a ticket for that here https://github.com/bryntum/support/issues/8358
Best regards,
Márcio