amsul / amsul/react-translated

Return string to object

未关闭
#14 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
176
派生
12
PR 合并指标
30 天内没有已合并 PR

描述

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

clubs = dataClubs.map((item) => {
return ({
value: item.id,
label: ``
});
});

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 `,` where the parameter will be just text?

That you very much for help.

Ales

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。