AllenFang / AllenFang/react-bootstrap-table

Hide ID field when inserting data

Aberta
#1,912 4 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
2.2k
Forks
761
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.