onRowClick with dataFormat returns undefined row Value
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, react
- Lĩnh vực
- frontend
Hướng nghiên cứu
Tái hiện cấu hình bảng bằng onRowClick, TableHeaderColumn và dataFormat, bao gồm cả hai trường ActionsBtn và titleFormatter. Theo dõi cách dataFormat ảnh hưởng đến giá trị được truyền vào onRowClick; hoàn thành khi các trường văn bản đã được định dạng cung cấp một giá trị có thể sử dụng, trong khi các trường hành động có thể tiếp tục được loại khỏi điều hướng theo hàng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello,
I have a table with items and the user can click on a row to go to the item page.
In this table, I have "Text" fields and "ActionsBtn" fields (such as duplicate, sort, delete)
I want the onRowClick be working solely with text field.
I use custom dataFormat for the "ActionsBtn" fields to render it.
So I twist my onRowClick function as such to be able solely to work if the user click on a field which is a "Text field".
const onRowClick = (row, value) => {
if (value !== undefined) {
localStorage.setItem("prestation", row.id);
history.push("/prestation#tariffs");
}
};
It works well as all fields render via a dataFormat function render an undefined value.
For instance :
<TableHeaderColumn dataField="duplicate" dataFormat={DuplicateBtn}>
But now I have a problem, I am using also dataFormat for specific "Text" fields (to display a tooltip or to display correctly number Values for instance).
For instance :
<TableHeaderColumn dataField="title" dataFormat={titleFormatter}>
To sumarize :
- I have found a setup where onRowClick function works for all fields of the row
- I have found a setup where onRowClick function works for all fields which are not rendered by dataFormat function
- I cannot find a setup where the onRowClick function works on all non "ActionsBtn" field since the value render by any dataFormat is always undefined.
Thanks in advance for any help or idea.
I am stucked on this issue.
Best,
Jérémy
- Ngôn ngữ chính
- JavaScript
- Star
- 2.2k
- Fork
- 753
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AllenFang/react-bootstrap-table
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
AllenFang/react-bootstrap-table#2053 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
AllenFang/react-bootstrap-table#2144 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
AllenFang/react-bootstrap-table#2143 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
AllenFang/react-bootstrap-table#2142 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
AllenFang/react-bootstrap-table#2141 ·
Tất cả issue của AllenFang/react-bootstrap-table
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 87/100
OWASP/CheatSheetSeries#2905 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ComposioHQ/composio#5249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
zilliztech/memsearch#838 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[DOCS] Nine one-colon directives hide code examples and notes in the reference docs (e.g. CustomJS)Đang mởTRIAGE
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
cdx-audit output written to a pipe is cut off at 64 KiBCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug mode:cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày