Skip to content
Source
Sign inSign up
TanStack/form

[v2] feat: allow nested field components #2450

OpenLeCarbonator(GitHub profile, opens in a new tab)wants to merge 8 commits intoopts-refactor fromnested-field-groupsopened

Showing 50 changed files with 99 additions and 0 deletions (loading 46).

x
0 of 50 viewed, 50 left
22 additions and 0 deletionsexamples/lit/field-groups/src/index.tsModified
View file
@@ -3,6 +3,7 @@
import { TanStackFormController } from '@tanstack/lit-form'
import { DateRangeField } from './date-range'
import { LowerBoundField, UpperBoundField } from './field-bounds'
+import { NumberRangeField } from './number-range'
import './styles.css'
​
@customElement('tanstack-field-groups')
@@ -15,6 +16,12 @@
defaultValues: { minAge: '', maxAge: '' },
})
​
+ private budgetForm = new TanStackFormController(this, {
+ defaultValues: {
+ filters: { minBudget: '10', maxBudget: '100' },
+ },
+ })
+​
private dateForm = new TanStackFormController(this, {
defaultValues: {
dateRanges: [
@@ -57,6 +64,21 @@
label: 'Highest Age',
})}
</section>
+ <section>
+ <h2>Nested Field Groups</h2>
+ ${NumberRangeField({