From 32d8e93ddf574791b7aa8b4fef7eba6a4222be07 Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Sun, 28 May 2017 19:05:27 +0500 Subject: [PATCH] Make checks based on state, not conf.value --- .../extension-common/pages/options/src/components/InfoLi.js | 3 +-- .../src/extension-common/pages/options/src/components/Main.js | 1 + .../extension-common/pages/options/src/components/ModList.js | 4 ++-- .../pages/options/src/components/ProxyEditor.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/InfoLi.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/InfoLi.js index ebb12d8..6a183b0 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/InfoLi.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/InfoLi.js @@ -23,7 +23,6 @@ export default function getInfoLi() { .infoRow { position: relative; - flex-wrap: wrap; } .infoRow > input[type="checkbox"] { position: relative; @@ -119,7 +118,7 @@ export default function getInfoLi() { const iddy = props.idPrefix + ( props.ifDashify ? camelToDash(props.conf.key) : props.conf.key ); return ( -
  • +
  • { diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js index c0aaa4b..d07e72f 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js @@ -20,10 +20,10 @@ export default function getModList(theState) { handleCheck(confMeta, ifChecked) { - this.state.checks[confMeta.index] = ifChecked; if (ifChecked === false || !confMeta.ifChild) { this.handleNewValue(confMeta, ifChecked); } else { + console.log('SET STATE', confMeta.index); this.setState({ checks: this.state.checks.map( (ch, i) => i === confMeta.index ? ifChecked : ch @@ -63,7 +63,7 @@ export default function getModList(theState) { conf={conf} type='checkbox' name={props.name} - checked={conf.value} + checked={this.state.checks[index]} key={index} onChange={(event) => this.handleCheck(confMeta, event.target.checked)} > diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ProxyEditor.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ProxyEditor.js index 59ce2b8..8d57680 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ProxyEditor.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ProxyEditor.js @@ -96,7 +96,7 @@ export default function getProxyEditor(theState) { font-weight: 900; } table.editor .export { - padding-right: 2px; + /*padding-right: 2px;*/ } /* LAST COLUMN: BUTTONS */