mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-29 20:34:38 +00:00
The generated form never showed the key column, which is right for a key the database assigns and left a string key with nowhere to be typed: a table keyed on one could be created through the API but not from its page. For a string key the form now carries an input for it, required, and disabled once the record exists - bound to form.isEdit, the same way the hand-written dictionary and config pages lock their natural keys. A page for a table keyed on an int renders exactly as before. This needs go-admin-ui's useForm to record whether a form was opened to create or to edit (go-admin-ui#310). The useForm before it inferred the mode from the key's presence, so typing the key into a create form turned the submit into an update.