-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(works-to-trees): Add DateInputField
to List
component
#3519
Conversation
DateInputField
to List
componentDateInputField
to List
component
Removed vultr server and associated DNS entries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this one up, works perfect !
id, | ||
data, | ||
}) => { | ||
const { formik, activeIndex } = useListContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we think next about how to better share "schemas" between components that may use them (List
here, MapAndLabel
next) - I'm very interested if this useListContext()
could be extracted out into a useSchemaContext
or similar ?? Then the "Schema" becomes a Context & formik aware component that can be referenced in many components?
Was anticipating "fields" would be something I could externally reference/"just pull into" initial MapAndLabel
setup - but this bit of context very much collided / lead me to initially just duplicating field definitions with a minor useMapAndLabelContext()
difference.
Definitely not a thing to address in this PR, just starting to think bigger direction!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally - this is the exact issue I hit when I was trying to rush out Page
before show and tell 😅
There's really two layers of responsibility here - something which handles fields, and something which handles lists (or the wider component). So errors relating to min, max, etc would be in the lists "layer" and the field validation logic etc can we handled elsewhere.
Planning on taking a look at this next pretty much as I know it's a bit of a blocker atm 👍
What does this PR do?
Allows dates to be added to list component schemas
Why
Required for works to trees feature, useful for other list schemas.