Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ The components provides following public methods:
* `reset(clearUploads = false)` - Resets the widget, You can also remove all the current uploads if `clearUploads` is set to `true`
* `openDialog()` - Opens Uploadcare widget dialog with current configuration.
* `reject()` - Closes the dialog opened with `openDialog()` method only and discards any file selection.
* `getDialogApi()` - Returns [Dialog API instance][uc-docs-js-api-dialog-api]

All methods are accessible from a parent component via the `@ViewChild()` approach.

Expand Down Expand Up @@ -265,3 +266,4 @@ request at [[email protected]][uc-email-hello].
[uc-docs-widget-validators]: https://uploadcare.com/docs/api_reference/javascript/file_validation/
[uc-docs-js-api-widget-on-upload-complete]: https://uploadcare.com/docs/api_reference/javascript/widget/?utm_source=github&utm_campaign=ngx-uploadcare-widget#widget-on-upload-complete
[uc-docs-js-api-widget-on-change]: https://uploadcare.com/docs/api_reference/javascript/widget/?utm_source=github&utm_campaign=ngx-uploadcare-widget#widget-on-change
[uc-docs-js-api-dialog-api]: https://uploadcare.com/docs/file-uploader-api/dialog-panel/#dialog-api
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ export class UcWidgetComponent implements AfterViewInit, AfterViewChecked {
}
}

getDialogApi() {
return this.dialog;
}

private setReinitFlag(isClearValue: boolean) {
if (this.widget) {
this._reinitRequired = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,7 @@ export class UcWidgetCustomComponent {
}
}

getDialogApi() {
return this.dialog;
}
}