iron-form icon indicating copy to clipboard operation
iron-form copied to clipboard

iron-form-error: request in event.detail.request and not in event.detail as documented

Open charlesmulder opened this issue 9 years ago • 4 comments

charlesmulder avatar Feb 22 '16 11:02 charlesmulder

Oh, I think you're right. Would you like to write a patch for this? We'd be more than happy to walk you through the steps involved.

notwaldorf avatar Feb 29 '16 00:02 notwaldorf

I've done a little bit of digging.

Looks like the issue lies in iron-ajax.

_handleError method expects request and error as params

Looks like the error argument is missing.

Catched error should be passed as argument to _handleError method call.

If my suggested change is correct. The next step would be to update the iron-form docs, specifically the part about the iron-form-error event to something along the lines of:

Fired after the form is submitted and an error is received. An IronRequestElement is included as the event.detail.request object. Error message string is included as event.detail.error.

charlesmulder avatar Mar 02 '16 09:03 charlesmulder

Let me know if you require anything else.

charlesmulder avatar Mar 02 '16 09:03 charlesmulder

Yup, your new comment looks great! Feel free to create a PR with that :)

notwaldorf avatar Mar 08 '16 02:03 notwaldorf