Skip to content
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

Default values for child fields #34

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Conversation

smikhalevski
Copy link
Owner

@smikhalevski smikhalevski commented Apr 23, 2024

Default value can be provided when the child field is accessed for the first time:

const filed = createField<{ text?: string }>({});

field.at('text', 'Hello').value
// ⮕ 'Hello'

@smikhalevski smikhalevski self-assigned this Apr 23, 2024
@smikhalevski smikhalevski merged commit df9d7ed into master Apr 23, 2024
4 checks passed
@smikhalevski smikhalevski deleted the child-field-default-value branch April 23, 2024 12:21
@smikhalevski smikhalevski restored the child-field-default-value branch April 30, 2024 20:33
@smikhalevski smikhalevski deleted the child-field-default-value branch April 30, 2024 20:34
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.

1 participant