fix settings not changing

This commit is contained in:
Zack Rauen 2020-03-27 16:51:41 -04:00
parent c80ceed509
commit 56e342ff7e
3 changed files with 3 additions and 3 deletions

View File

@ -731,7 +731,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return SwitchItem; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _components_switch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/switch */ \"./src/ui/components/switch.jsx\");\n\n\nclass SwitchItem extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.onChange = this.onChange.bind(this);\n }\n\n onChange() {\n this.props.onChange(this.props.id, !this.state.checked);\n this.props.checked = !this.props.checked;\n }\n\n render() {\n const {\n text,\n info\n } = this.props.data;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-flex flex-vertical flex-justify-start flex-align-stretch flex-nowrap ui-switch-item\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-flex flex-horizontal flex-justify-start flex-align-stretch flex-nowrap\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"h3\", {\n className: \"ui-form-title h3 margin-reset margin-reset ui-flex-child\"\n }, text), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_components_switch__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n onChange: this.onChange,\n checked: this.props.checked\n })), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-form-text style-description margin-top-4\",\n style: {\n flex: \"1 1 auto\"\n }\n }, info));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc3dpdGNoLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQ29yZS8uL3NyYy91aS9zd2l0Y2guanM/YjA2YSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQkRWMiBmcm9tIFwiLi4vbW9kdWxlcy92MlwiO1xuaW1wb3J0IFN3aXRjaCBmcm9tIFwiLi9jb21wb25lbnRzL3N3aXRjaFwiO1xuZXhwb3J0IGRlZmF1bHQgY2xhc3MgU3dpdGNoSXRlbSBleHRlbmRzIEJEVjIucmVhY3RDb21wb25lbnQge1xuICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgIHN1cGVyKHByb3BzKTtcbiAgICB0aGlzLm9uQ2hhbmdlID0gdGhpcy5vbkNoYW5nZS5iaW5kKHRoaXMpO1xuICB9XG5cbiAgb25DaGFuZ2UoKSB7XG4gICAgdGhpcy5wcm9wcy5vbkNoYW5nZSh0aGlzLnByb3BzLmlkLCAhdGhpcy5zdGF0ZS5jaGVja2VkKTtcbiAgICB0aGlzLnByb3BzLmNoZWNrZWQgPSAhdGhpcy5wcm9wcy5jaGVja2VkO1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIGNvbnN0IHtcbiAgICAgIHRleHQsXG4gICAgICBpbmZvXG4gICAgfSA9IHRoaXMucHJvcHMuZGF0YTtcbiAgICByZXR1cm4gQkRWMi5yZWFjdC5jcmVhdGVFbGVtZW50KFwiZGl2XCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJ1aS1mbGV4IGZsZXgtdmVydGljYWwgZmxleC1qdXN0aWZ5LXN0YXJ0IGZsZXgtYWxpZ24tc3RyZXRjaCBmbGV4LW5vd3JhcCB1aS1zd2l0Y2gtaXRlbVwiXG4gICAgfSwgQkRWM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joiIn0=\n//# sourceURL=webpack-internal:///./src/ui/switch.js\n");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return SwitchItem; });\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _components_switch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/switch */ \"./src/ui/components/switch.jsx\");\n\n\nclass SwitchItem extends _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].reactComponent {\n constructor(props) {\n super(props);\n this.onChange = this.onChange.bind(this);\n }\n\n onChange() {\n this.props.checked = !this.props.checked;\n this.props.onChange(this.props.id, this.props.checked);\n }\n\n render() {\n const {\n text,\n info\n } = this.props.data;\n return _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-flex flex-vertical flex-justify-start flex-align-stretch flex-nowrap ui-switch-item\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-flex flex-horizontal flex-justify-start flex-align-stretch flex-nowrap\"\n }, _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"h3\", {\n className: \"ui-form-title h3 margin-reset margin-reset ui-flex-child\"\n }, text), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(_components_switch__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n onChange: this.onChange,\n checked: this.props.checked\n })), _modules_v2__WEBPACK_IMPORTED_MODULE_0__[\"default\"].react.createElement(\"div\", {\n className: \"ui-form-text style-description margin-top-4\",\n style: {\n flex: \"1 1 auto\"\n }\n }, info));\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdWkvc3dpdGNoLmp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ggZmxleC1ub3dyYXBcIlxuICAgIH0sIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChcImgzXCIsIHtcbiAgICAgIGNsYXNzTmFtZTogXCJ1aS1mb3JtLXRpdGxlIGgzIG1hcmdpbi1yZXNldCBtYXJnaW4tcmVzZXQgdWktZmxleC1jaGlsZFwiXG4gICAgfSwgdGV4dCksIEJEVjIucmVhY3QuY3JlYXRlRWxlbWVudChTd2l0Y2gsIHtcbiAgICAgIG9uQ2hhbmdlOiB0aGlzLm9uQ2hhbmdlLFxuICAgICAgY2hlY2tlZDogdGhpcy5wcm9wcy5jaGVja2VkXG4gICAgfSkpLCBCRFYyLnJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIiwge1xuICAgICAgY2xhc3NOYW1lOiBcInVpLWZvcm0tdGV4dCBzdHlsZS1kZXNjcmlwdGlvbiBtYXJnaW4tdG9wLTRcIixcbiAgICAgIHN0eWxlOiB7XG4gICAgICAgIGZsZXg6IFwiMSAxIGF1dG9cIlxuICAgICAgfVxuICAgIH0sIGluZm8pKTtcbiAgfVxuXG59Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/switch.js\n");
/***/ }),

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -9,8 +9,8 @@ export default class SwitchItem extends BDV2.reactComponent {
}
onChange() {
this.props.onChange(this.props.id, !this.state.checked);
this.props.checked = !this.props.checked;
this.props.onChange(this.props.id, this.props.checked);
}
render() {