-
Hello, I have a "tui-select" and I use @tuiPure stringify to have a difference between the "valueContent" & the "value". Concert example: HTML
CONTROLLER, I would like the "name" translated
const COUNTRIES
The list of values does change in the select, but the value displayed by the "valueContent" always remains in English. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Another option is to not mutate |
Beta Was this translation helpful? Give feedback.
@tuiPure
memoizes result if input hasn't changed. Looks like yourcountries
array remains the same. You need to pass your translations into yourstringify
method as a second argument so that when new translations arrive — it would recalculate the result.Another option is to not mutate
countries
, this way it would become a new ref to the new array andstringify
method will be retriggered.