Extended widget API 'force' option to React and PlainJS
This commit is contained in:
parent
d2cc5f0c18
commit
541720bf50
|
@ -68,6 +68,8 @@ export const getWidget = arg => {
|
||||||
// Plugin
|
// Plugin
|
||||||
if (force?.toLowerCase() === 'react') {
|
if (force?.toLowerCase() === 'react') {
|
||||||
return React.createElement(widget, config);
|
return React.createElement(widget, config);
|
||||||
|
} else if (force?.toLowerCase() === 'plainjs') {
|
||||||
|
return <WrappedWidget widget={widget} config={config} />
|
||||||
} else {
|
} else {
|
||||||
// Auto-detect
|
// Auto-detect
|
||||||
if (isReactComponent(widget)) {
|
if (isReactComponent(widget)) {
|
||||||
|
|
Loading…
Reference in New Issue