I'm trying to insert buttons into select items such as this. I'd like each element to have a button so that a different action can be taken if the button is clicked, such as removing that item from the list. If I put the code for the button in the label field then the button shows up but it doesn't handle the on:click directive.
No you can't do this.
This library expects the value to be a string, at most a html script for some extra styling, but you cannot add interactions like that.
The code you have is similar to do doing:
<script>
const str = "<button on:click={console.log}>click me</button>"
</script>
{@html str}
While this will render a button Svelte will not add the event handler to this, but rather just render the string as you gave it (in face if you inspect the rendered markup you will still the on:click written there)
first try css , test peroperty z-index: 9999; for close button .
if css peroperty not working try to console.log('someting') if close button with click event in javascript ; and if you got console.log('someting');
now you can write fucntion to close your item;
i hope i can alitel help;