Skip to content

Conversation

ischaojie
Copy link
Contributor

@ischaojie ischaojie commented Dec 2, 2023

fixes #32

image

@ischaojie ischaojie marked this pull request as ready for review December 2, 2023 10:43
Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks so much, looking good.

}
case 'FormFieldInput':
case 'FormFieldCheckbox':
switch (subElement) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather than copying logic, can we combine this with the logic below, maybe worth moving out into a separate function?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can probably use the {[string]: bool} variant of ClassName to make most of these cases more declarative.

@samuelcolvin samuelcolvin enabled auto-merge (squash) December 4, 2023 13:06
@samuelcolvin
Copy link
Member

This is great, thanks so much.

@samuelcolvin samuelcolvin mentioned this pull request Dec 4, 2023
@samuelcolvin samuelcolvin merged commit 8beb7fd into pydantic:main Dec 4, 2023
@ischaojie ischaojie deleted the dev branch December 4, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toggle switches

2 participants