AllenFang / AllenFang/react-bootstrap-table
Hide ID field when inserting data
- Ngôn ngữ chính
- JavaScript
- Star
- 2.2k
- Fork
- 761
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Hi,
Thanks for this awesome component.
I am trying to setup a form for my table that hides the id field when inserting a new row (my backend will generate it for me). I have tried lots of things and nothing worked.
First of all I have tried to set isKey and autovalue like this:
```
ID
Name
```
Note that autovalue is not in camelcase like in the documentation, but it seems that in my version of the module is all in lowercase. This still shows the field and adds no value to it.
I have also tried to user hiddenOnInsert and have a onAddRow function that populates the id. No luck.
Third thing I have tried is to use hiddenOnInsert and have a customInsertEditor where getFieldValue always returns a dummy number. That didn't work either. If I hide the id field I always get the error: "id can't be empty value".
What would be the best solution for this problem?
Thank you
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.