Extended widget API 'force' option to React and PlainJS

This commit is contained in:
Rainer Simon 2021-08-01 18:51:25 +02:00
parent d2cc5f0c18
commit 541720bf50
1 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,8 @@ export const getWidget = arg => {
// Plugin
if (force?.toLowerCase() === 'react') {
return React.createElement(widget, config);
} else if (force?.toLowerCase() === 'plainjs') {
return <WrappedWidget widget={widget} config={config} />
} else {
// Auto-detect
if (isReactComponent(widget)) {