ModalWrapper: Properly unused prop `handleOpen`?
See original GitHub issueSummary
I’m not sure if I just don’t see the use of the prop handleOpen
.
The component uses a class method this.handleOpen
, but the prop handleOpen
seems not to be used in any way. I don’t even see the prop passed down to a defined prop of the component Modal
.
Maybe someone can have a look at this to check my supposition.
If I’m right, I would fix this issue together with a new feature I had in mind, when opening the source code.
Relevant information
Here’s the line of the prop definition: https://github.com/IBM/carbon-components-react/blob/0e2f293fc1731b1a848aae090a5d530e9deac369/src/components/ModalWrapper/ModalWrapper.js#L17
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
React Lifting State in Component with Containment
I'm trying to use hooks within the EventsFormModal, and whenever onOk gets called, have state be passed to ModalWrapper. However, with the way ......
Read more >Typechecking With PropTypes - React
To run typechecking on the props for a component, you can assign the special propTypes property: import PropTypes from 'prop-types'; class Greeting extends ......
Read more >How to validate React props using PropTypes - LogRocket Blog
Learn how to validate props with React PropTypes, React's internal ... require a prop to be defined, otherwise, it will not render properly....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tw15egan Just my thoughts; Probably not. New modal doc in the work that explains how to implement a state manager for modal (instead of using
<ModalWrapper>
) would be the ultimate solution.Hi @emyarod thanks for looking at this. I’ll make my changes to the code today. I think I’ll refactor the props of the component and add some descriptions, etc.