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
Currently options of the .select() can be an Object or an Array (or a Function returning one of them).
This creates multiple cases internally.
Add a text: (key: string): string as additionalArgs. This defaults to key => key. When options is not an object, create one with text. This will simplify following logic.
The text was updated successfully, but these errors were encountered:
Alternatively remove Object completely and only allow text and the key[]. This is easy to understand for the user and most cases can be done with this.
Issue I can think of currently: button text is influenced by the whole array. Then the user logic has to check on it every call. This might be time consuming. The object would do this only once. But: Multiple pages of items could only change the current page of button texts.
Possibly helpful with this might me an additional argument for the text function: text: (ctx, key, arr: key[]): string
Currently options of the
.select()
can be an Object or an Array (or a Function returning one of them).This creates multiple cases internally.
Add a
text: (key: string): string
as additionalArgs. This defaults tokey => key
. When options is not an object, create one withtext
. This will simplify following logic.The text was updated successfully, but these errors were encountered: