This demo shows how you can integrate 3rd party components into Subschema. It currently shows
Both where integrated without any modifications to the original code.
Below is the total code that integrated these.
"use strict";
import {loaderFactory, PropTypes} from "Subschema";
import MaskedInput from "react-maskedinput";
import ReactSelect from "react-select";
import 'react-select/dist/react-select.css';
//this is the entry for exporting library.
const loader = loaderFactory();
ReactSelect.propTypes.onChange = PropTypes.valueEvent;
ReactSelect.propTypes.value = PropTypes.value;
loader.addType({
MaskedInput,
ReactSelect
});
export default loader;
##Demo See it in action here
Or run it
git clone https://github.com/subschema/subschema-external-component-example.git
cd subschema-external-component-example
npm install
npm run hot &
open http://localhost:8083