Comments (5)
Got more info:
Uncaught TypeError: getOpenState is not a function
at eval (Modal.tsx:87)
eval @ Modal.tsx:87
setTimeout (async)
eval @ Modal.tsx:85
eval @ Modal.tsx:147
invokePassiveEffectCreate @ react-dom.development.js:23482
callCallback @ react-dom.development.js:3945
invokeGuardedCallbackDev @ react-dom.development.js:3994
invokeGuardedCallback @ react-dom.development.js:4056
flushPassiveEffectsImpl @ react-dom.development.js:23569
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11276
flushPassiveEffects @ react-dom.development.js:23442
performSyncWorkOnRoot @ react-dom.development.js:22264
eval @ react-dom.development.js:11327
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11276
flushSyncCallbackQueueImpl @ react-dom.development.js:11322
flushSyncCallbackQueue @ react-dom.development.js:11309
unbatchedUpdates @ react-dom.development.js:22433
legacyRenderSubtreeIntoContainer @ react-dom.development.js:26015
render @ react-dom.development.js:26098
eval @ app.tsx:14
./resources/assets/user_account/app.tsx @ app.js:18
options.factory @ manifest.js:614
__webpack_require__ @ manifest.js:36
__webpack_exec__ @ app.js:564
(anonymous) @ app.js:565
__webpack_require__.O @ manifest.js:90
(anonymous) @ app.js:566
webpackJsonpCallback @ manifest.js:1268
(anonymous) @ app.js:9
from mdb4-react-ui-kit.
I don't see this prop as required in prop types or any explanation about its purpose in docs.
declare const MDBModal: React$1.FunctionComponent<{
animationDirection?: string;
backdrop?: boolean;
className?: string;
closeOnEsc?: boolean;
tabIndex?: string;
show?: boolean;
staticBackdrop?: boolean;
tag?: React$1.ComponentProps<any>;
modalRef?: React$1.RefObject<HTMLElement>;
[rest: string]: any;
}>;
from mdb4-react-ui-kit.
Thanks for Your report, we will fix this in the next release. For now, update the MDBModal component to look like this:
<MDBModal staticBackdrop show={debugModalContent !== null} getOpenState={(e: any) => e} tabIndex='-1'>
The problem is caused by the getOpenState property, which should be required except for the example with staticBackdrop.
from mdb4-react-ui-kit.
Hi. Thanks for reply. I've already done that to fix error for the time being.
While reviewing the code of Modal.tsx
I came to realization that getOpenState(true)
is redundant because modal visibility is handled by show
property and I can't think of any situation when modal can show itself avoiding show
property. In result only
getOpenState(false)
is meaningful. So why not rename getOpenState
to more understandable onClose
or onBackdropClose
and call it only when modal closes by any means except show
property?
from mdb4-react-ui-kit.
Thanks for Your suggestion. We will think about changing the property name in the next release.
from mdb4-react-ui-kit.
Related Issues (15)
- Use Vite instead of Create React App for boilerplate HOT 1
- MdbInput label overlaps the text from the input field when the input focus is lost HOT 1
- React-Bootstrap-with-Material-Design? HOT 1
- Extremely weird behavior of the `MDBDataTable` component HOT 4
- Is this a new library or a new version of mdbreact? HOT 6
- Installing produces 3 vulnerabilities
- Please update dependencies material ui core and material ui pickers so that we can use mdbreact with react 17 HOT 1
- Warning: findDOMNode is deprecated in StrictMode HOT 2
- MDBBtn outline ripple is not visible HOT 1
- Carousel not displaying properly HOT 1
- MDBInput not displaying properly in Modal HOT 2
- scroll not hidden when modal is open HOT 4
- MDBCarousel behavior is weird + bug in documentation HOT 1
- Checkboxes are not aligned with the text when changing $font-size-base HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdb4-react-ui-kit.