callstack / callstack/react-native-paper
Allow Drawer.Item to wrap across multiple lines
- Ngôn ngữ chính
- TypeScript
- Star
- 14.5k
- Fork
- 2.2k
- Merge trung bình
- 5 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 12
Mô tả
Our application supports multiple languages and the Drawer.Item currently always truncates with an ellipsis rather than allowing wrapping across multiple lines. The Drawer.Item component is hard-coded to only allow one line of text. This results in our menu items always being cut off when long translated text is used if there is insufficient width.
It would be great if the `numberOfLines` property on the text element of the Drawer.Item was a property so that constraint could be overwritten.
I have tried using patch-package and confirmed it works in debug mode, but the pre-compiled version with numberOfLines set to 1 is always used in release builds. Adjusting the width of the side navigation isn't an optimal solution as languages like Russian are often overly verbose and would still be cut off.

Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu từ component Drawer.Item và kiểm tra phần tử văn bản nơi numberOfLines được cố định là 1. Xác nhận cách thuộc tính này được cung cấp và xác minh rằng các nhãn đã dịch có thể xuống dòng trên nhiều dòng trong các bản build release; hoàn thành có nghĩa là có thể ghi đè ràng buộc cắt ngắn hiện có mà không làm hỏng hành vi mặc định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react-native, typescript
- Lĩnh vực
- mobile
- Loại issue
- Tính năng
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 45/100