question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModalWrapper: Properly unused prop `handleOpen`?

See original GitHub issue

Summary

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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
asudohcommented, Jun 13, 2020

@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.

1reaction
IOIO72commented, Feb 6, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found