AllenFang / AllenFang/react-bootstrap-table

Hide ID field when inserting data

Ouverte
#1,912 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
2.2k
Forks
761
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.