You can change the value of the widget with the onChange function by returning a valid token group array.
onChange
In this silly example, we're always confirming that the user wants to remove a fruit.