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
The following example shows form.update() does not consider input function.
const fields = [ 'priority', 'itineraryItems[].hotel.name', 'itineraryItems[].hotel.starRating', ]; const input = { 'priority': p => p === '' ? -1 : Number(p), 'itineraryItems[].hotel.starRating': rate => { return Number(rate) } } class NewForm extends Form { hooks() { return { onInit(form) { form.update({ priority: '1', itineraryItems: [{ hotel: { name: 'Shangri-La Hotel', starRating: '5.0', }, }, { hotel: null, }, { hotel: { name: 'Trump Hotel', starRating: '5.0', }, }], }); }, }; } } const form = new NewForm({ fields, input }, { name: 'Form 998' }); describe.only('number rating', () => { it('', () => { expect(form.$('priority').value).to.be.equal(1) // fails, it is still '1' expect(form.$('itineraryItems.0.hotel.starRating').value).to.be.equal(5) // fails, it is still '5' }) });
The text was updated successfully, but these errors were encountered:
fix issues foxhound87#514 foxhound87#515
ce702b7
fix issues foxhound87#514 foxhound87#516
1fd8470
d0c7b60
0b427b7
🎉 This issue has been resolved in version 2.0.5 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sorry, something went wrong.
No branches or pull requests
The following example shows form.update() does not consider input function.
The text was updated successfully, but these errors were encountered: