Hello – I am trying to use the chip component from anvil extras, but keep running into an issue. I can select the chip but I am unable to deselect it even by using the close link.
Here is the sample of code I have for clicking and close clicking one of the chips:
def app_web_chip_1_click(self, **event_args):
WORKS CORRECTLY
def app_web_chip_1_click(self, **event_args):
“”“This method is called when the chip is clicked”“”
key_terms.append(self.app_web_chip_1)
self.app_web_chip_1.background = “theme:Primary”
pass
DOESN’T WORK AT ALL
def app_web_chip_1_close_click(self, **event_args):
“”“This method is called when the close link is clicked”“”
key_terms.remove(self.app_web_chip_1)
self.app_web_chip_1.background = “theme:On Primary Container”
pass
I have also tried getting rid of the close icon and just having the an if statement in the click button.