AllenFang / AllenFang/react-bootstrap-table

Hide ID field when inserting data

Aperta
#1,912 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
2.2k
Fork
761
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.