diff --git a/api-generator/components/image.js b/api-generator/components/image.js index 5904618a7e..cc1176560d 100644 --- a/api-generator/components/image.js +++ b/api-generator/components/image.js @@ -35,6 +35,17 @@ const ImageEvents = [ name: 'onHide', description: 'Triggered when the preview overlay is hidden.', arguments: [] + }, + { + name: 'onError', + description: 'Triggered when image has an error loading.', + arguments: [ + { + name: 'event', + type: 'object', + description: 'Browser event' + } + ] } ]; diff --git a/components/doc/image/index.js b/components/doc/image/index.js index ceeb9eb547..5c92e51080 100644 --- a/components/doc/image/index.js +++ b/components/doc/image/index.js @@ -207,6 +207,11 @@ import { Image } from 'primereact/image'; - Triggered when the preview overlay is hidden. + + onError + event: Browser event + Triggered when the image fails to load. +