Merge pull request #287 from bknd-io/feat/data-ui-fillable-visible
Run Tests / test (pull_request) Canceled after 1m52s

make non-fillable fields visible but disabled in UI
This commit is contained in:
Shishant Biswas
2026-09-24 17:22:42 +05:30
committed by GitHub
12 changed files with 355 additions and 38 deletions
@@ -45,7 +45,7 @@ export function EntityForm({
className,
action,
}: EntityFormProps) {
const fields = entity.getFillableFields(action, true);
const fields = entity.getFields({ virtual: true, primary: false });
const options = useEntityAdminOptions(entity, action);
return (
@@ -93,10 +93,6 @@ export function EntityForm({
);
}
if (!field.isFillable(action)) {
return;
}
const _key = `${entity.name}-${field.name}-${key}`;
return (
@@ -128,7 +124,7 @@ export function EntityForm({
<EntityFormField
field={field}
fieldApi={props}
disabled={fieldsDisabled}
disabled={fieldsDisabled || !field.isFillable(action)}
tabIndex={key + 1}
action={action}
data={data}
@@ -17,7 +17,7 @@ export function useEntityForm({
}: EntityFormProps) {
const data = initialData ?? {};
// @todo: check if virtual must be filtered
const fields = entity.getFillableFields(action, true);
const fields = entity.getFields({ virtual: true, primary: false });
// filter defaultValues to only contain fillable fields
const defaultValues = getDefaultValues(fields, data);