Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
When clicking the edit button on a link in lexical the following error happens:
Uncaught TypeError: toggleModal is not a function
at onClick (index.tsx:307:19)
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:14)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16)
at invokeGuardedCallback (react-dom.development.js:4277:31)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:25)
at executeDispatch (react-dom.development.js:9041:3)
at processDispatchQueueItemsInOrder (react-dom.development.js:9073:7)
at processDispatchQueue (react-dom.development.js:9086:5)
at dispatchEventsForPlugins (react-dom.development.js:9097:3)
at react-dom.development.js:9288:12
The error points to the fact toggleModal is undefined when called.
Debugging in devtools I found out useModal is returning {}.
To Reproduce
It's a relatively fresh project, started with npx create-payload-app@latest and added @payloadcms/richtext-lexical
Link to reproduction
No response
Describe the Bug
When clicking the edit button on a link in lexical the following error happens:
The error points to the fact toggleModal is undefined when called.
Debugging in devtools I found out
useModal
is returning{}
.To Reproduce
It's a relatively fresh project, started with
npx create-payload-app@latest
and added@payloadcms/richtext-lexical
Here's my payload config:
Payload Version
2.0.0
Adapters and Plugins
db-postgres, bundler-webpack,