Material-ui: [Dialog] TypeScript onClose signature does not match Documentation

Created on 15 Apr 2019  路  1Comment  路  Source: mui-org/material-ui


Currently the onClose callback on Dialog component does not have the correct typings:

image

  • [x] This is not a v0.x issue.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 馃


onClose on Dialog should have the correct typings: (event, reason)

Current Behavior 馃槸


Same as Summary above

Steps to Reproduce 馃暪


Link:

1.
2.
3.
4.

Context 馃敠


Documentations state that onClose is a callback with signature (event, reason: string) but this doesn't seem to be correct on the typings. I need to access the reason parameter here.

DISCLAIMER: I am aware of onBackdropClick and onEscapeKeyDown event which I'm currently using but this introduces code duplication in my project.

Your Environment 馃寧

| Tech | Version |
|--------------|---------|
| Material-UI | v3.9.3 |
| React | v16.8.x |
| Browser |Chrome|
| TypeScript |3.4.x|
| etc. | |

bug 馃悰 Dialog good first issue typescript

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rbozan picture rbozan  路  3Comments

mb-copart picture mb-copart  路  3Comments

reflog picture reflog  路  3Comments

zabojad picture zabojad  路  3Comments

revskill10 picture revskill10  路  3Comments