Skip to content

Return string to object #14

Description

@AlesVykoukal

Hi, I have Dropdown component with filtering.
I'm getting data for the component from ...

clubs = dataClubs.map((item) => {
return ({
value: item.id,
label: <Translate text="..." >
});
});

Displaying a component is OK, but if I start filtering over the data, an error message will be displayed:
TypeError: option.label.toLowerCase is not a function

I tried to use "getTranslated" and work, but I must put in params language and translation.
Is it possible to add something like <Translator>, where the parameter will be just text?

That you very much for help.

Ales

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions