Change spinner item text at runtime?

I would like to change the text of a spinner list item at runtime. In the spinner AfterSelecting handler, I tried to replace a list item in spinner.Elements, but it had no effect. Am I doing it incorrectly, or is there a better approach?
For example, if I have a spinner with 3 items, “Able, Baker, Charly” and the user selects the 3rd item I then want the list to show “Able, Baker, Chocolate”.

Show us how you are doing the replacement.

replace
This block is in the AfterSelecting handler.

I can see why you would think that would work, but a Spinner (Component) is not a List (Block).

  1. Start with a List that holds the values.
  2. Set the Spinner Elements with the List.
  3. If a value is to be replaced, replace it in the List, then set the Spinner with the modified List.

Thanks, that’s just what I needed to know. I appreciate you for taking the time to set me straight.