: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
import ReactDOM from 'react-dom';
import FormControlController from './FormControlController';
import FormWidgetController from './FormWidgetController';
export interface IFormAttributes {
export default class registerFormWidget {
widgetContainer: Element;
attributes: IFormAttributes;
controlContainer: Element;
constructor(controlContainer: any, widgetContainer: any, setValue: Function) {
const attributes = widgetContainer.dataset.attributes
? JSON.parse(widgetContainer.dataset.attributes)
this.widgetContainer = widgetContainer;
this.controlContainer = controlContainer;
this.setValue = setValue;
this.attributes = attributes;
FormWidgetController(this.attributes, this.setValue)(),
FormControlController(this.attributes, this.setValue)(),
ReactDOM.unmountComponentAtNode(this.widgetContainer);
ReactDOM.unmountComponentAtNode(this.controlContainer);