# Documentation update needed - uppy.requestCloseModal is not a function

**URL:** <https://community.transloadit.com/t/documentation-update-needed-uppy-requestclosemodal-is-not-a-function/16419>\
**Category:** Uppy\
**Created:** [January 8, 2023, 6:56am UTC](https://community.transloadit.com/t/documentation-update-needed-uppy-requestclosemodal-is-not-a-function/16419 "2023-01-08T06:56:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zagarskas](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/zagarskas/32/598_2.png) [@zagarskas](https://community.transloadit.com/u/zagarskas)\
**Post date:** [January 8, 2023, 6:56am UTC](https://community.transloadit.com/t/documentation-update-needed-uppy-requestclosemodal-is-not-a-function/16419/1 "2023-01-08T06:56:20Z")

</div>

On this page:

> **[Dashboard — Uppy](https://uppy.io/docs/dashboard/)**

This code sample is not correct and will trigger JS console errors as there is no such function nor method

```auto
  doneButtonHandler: () => {
    this.uppy.cancelAll()
    this.requestCloseModal()
  },

```

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/transloadit/original/1X/3071b04a0664e7dbe7c9ee3eee462dd32b1565f0.png)

instead, I suspect the example should show

```auto
  doneButtonHandler: () => {
    this.uppy.cancelAll()
    this.uppy.getPlugin('MY_DASHBOARD_NAME').closeModal();
  },

```

This was the only way I was able to trigger the modal.  
Seems to me that “Uppy.requestCloseModal();” is no longer a function in 3.3.1

it should be noted I am using a custom function as follows

```auto
doneButtonHandler: () => { onDoneClick(); },

onDoneClick = function (files) {
    uppy.cancelAll();
    uppy.getPlugin('DashboardProofUpload').closeModal();
	if($('#user_completed').val() > 0) { 
          // do custom js form Validator stuff here with _files
          // tell user to upload missing stuff, show errors, ect...
         }
}

```

Related errors:

```auto
Uncaught TypeError: uppy.reset is not a function
Uncaught TypeError: Cannot read properties of undefined (reading 'uppy')
Uncaught TypeError: uppy.requestCloseModal is not a function

```
