ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

Token: onClick on default CloseIcon

Open ArneBuetergerds opened this issue 5 years ago • 2 comments

I want to use the token component and its default CloseIcon. I need to know when this icon is clicked, but there is no property for it.

I like to set a onCloseIconClick prop as a function. Or is there another way to get notified?

If this is not possible, you have always to set the closeIcon on your own.

chrome_2Hf7U0VFUl

ArneBuetergerds avatar Mar 31 '21 07:03 ArneBuetergerds

Hey @ArneBuetergerds, thanks for reporting! As far as I remember, the Token component was not intended for the standalone usage but rather as part of the MultiInput component. I'll forward this to our UI5 Web Components colleagues as the component is developed in their repo.

MarcusNotheis avatar Mar 31 '21 08:03 MarcusNotheis

Hi @ArneBuetergerds

I have prepared this sample in order to show you how you can use the token and its delete event.(BTW I noticed that it doesn't always load properly from the first time. If so, just refresh the inner page and it should work fine)

Usually tokens are used inside ui5-tokenizer but if you want to use them standalone, it is possible

fifoosid avatar Mar 31 '21 09:03 fifoosid