We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, The following 2 tests show nested array items are added when adding an array item:
it('nested array item inside array item 1', () => { const fields = [ 'options', 'options[]', 'options[].oid', 'options[].amendments', 'options[].amendments[]', 'options[].amendments[].oid', ] const $form = new Form({fields}, {name: 'form'}) const $option = $form.$('options').add() $option.update({oid: 1}) expect($form.select('options.0', null, false)).not.to.be.undefined expect($form.select('options.0.amendments.0', null, false)).to.be.undefined // <--- fail })
it('nested array item inside array item 2', () => { const fields = [ 'a', 'a[]', 'a[].oid', 'a[].b.c', 'a[].b.c[]', 'a[].b.c[].oid' ] const $form = new Form({fields}, {name: 'form'}) const $a = $form.$('a').add() $a.update({oid: 1}) expect($form.select('a.0', null, false)).not.to.be.undefined expect($form.select('a.0.b', null, false)).not.to.be.undefined expect($form.select('a.0.b.c', null, false)).not.to.be.undefined expect($form.select('a.0.b.c.0', null, false)).to.be.undefined // <--- fail })
The text was updated successfully, but these errors were encountered:
fix issues foxhound87#614 and foxhound87#615
5aee4c4
feat: update version 5.4.0
5f357f1
#616 #617 #615 #613 #614 #544 #454 #518 #376 #497 #582 #394
8feab3d
No branches or pull requests
Hi,
The following 2 tests show nested array items are added when adding an array item:
it('nested array item inside array item 1', () => {$form.$ ('options').add()
const fields = [
'options',
'options[]',
'options[].oid',
'options[].amendments',
'options[].amendments[]',
'options[].amendments[].oid',
]
const $form = new Form({fields}, {name: 'form'})
const $option =
$option.update({oid: 1})
expect($form.select('options.0', null, false)).not.to.be.undefined
expect($form.select('options.0.amendments.0', null, false)).to.be.undefined // <--- fail
})
it('nested array item inside array item 2', () => {$form.$ ('a').add()
const fields = [
'a',
'a[]',
'a[].oid',
'a[].b.c',
'a[].b.c[]',
'a[].b.c[].oid'
]
const $form = new Form({fields}, {name: 'form'})
const $a =
$a.update({oid: 1})
expect($form.select('a.0', null, false)).not.to.be.undefined
expect($form.select('a.0.b', null, false)).not.to.be.undefined
expect($form.select('a.0.b.c', null, false)).not.to.be.undefined
expect($form.select('a.0.b.c.0', null, false)).to.be.undefined // <--- fail
})
The text was updated successfully, but these errors were encountered: