amsul / amsul/react-translated

Return string to object

Đang mở
#14 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
176
Fork
12
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.