I am writing a CRUD application using react-bootstrap-table to edit records stored in a database table. The primary key is database generated (an int
field that gets an incremented value when inserting the record in the database). The TableHeaderColumn
for this field is defined with isKey={true}
.
I am having trouble getting the insert dialog to work with this. When hiding the column for insert (hiddenOnInsert
), the dialog reports the validation error "id can't be empty value."
I searched for a way to call a function before the insert dialog is opened, to be able to set a dummy value to the key column of the created row, but without luck.
How can I use the insert dialog with key columns that are database generated?