File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
packages/pydantic-forms/src Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' pydantic-forms ' : patch
3+ ---
4+
5+ Add schemaField const to set disabled attribute
Original file line number Diff line number Diff line change @@ -313,6 +313,10 @@ export const getFieldAttributes = function (
313313 attributes . disabled = true ;
314314 }
315315
316+ if ( schemaField . const ) {
317+ attributes . disabled = true ;
318+ }
319+
316320 if ( schemaField . uniforms ?. sensitive ) {
317321 attributes . sensitive = true ;
318322 }
Original file line number Diff line number Diff line change @@ -426,6 +426,7 @@ export interface PydanticFormPropertySchemaParsed
426426
427427 default ?: string | null ;
428428 format : PydanticFormFieldFormat ;
429+ const ?: number | string | boolean | null ;
429430
430431 uniforms ?: UniformProperties ;
431432
You can’t perform that action at this time.
0 commit comments