You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But once applied, you have to select one of the items for the texts to change. It would be nice to get a tutorial on how to make the text change in real time something like this:
@MarkoSh you will want to use choices._store.choices not choices._currentstate.choices for compatibility with v11.0.0.
I've prototyped up an Choices.updateLabel command but I'm still working on finishing off v11.0.0, with a primary focus on bugfix and performance fixes.
I have a select element where I change the text of an option. In normal time without a plugin this works fine just by using this piece of code:
option.text =
${ option.DEFAULT_TEXT }: fans ${ arr.length }${ total ?
, spent $${ total }: '' }
;When using the plugin I have to do destroy and init. Alternatively, I tried doing this:
choices._currentState.choices.map( ( choice: any ) => {
choice.label = 'Changed'; //
} );
But once applied, you have to select one of the items for the texts to change. It would be nice to get a tutorial on how to make the text change in real time something like this:
const choice = choices.getChoiceByValue( 'value_name' );
const customProperties = choice.customProperties;
const DEFAULT_TEXT = customProperties.DEFAULT_TEXT;
choices.setTextByValue( 'value_name',
${ DEFAULT_TEXT }: blablabla
);without reloading the element, but redraw it, even with dropdown
The text was updated successfully, but these errors were encountered: