mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-24 02:13:43 +03:00
Make checks based on state, not conf.value
This commit is contained in:
parent
88792658aa
commit
32d8e93ddf
|
@ -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 (
|
||||
<li class={scopedCss.infoRow + ' horFlex'}>
|
||||
<li class={scopedCss.infoRow + ' horFlex'} style={ props.children && 'flex-wrap: wrap'}>
|
||||
<input
|
||||
type={props.type}
|
||||
name={props.name}
|
||||
|
|
|
@ -69,6 +69,7 @@ export default function getMain(theState) {
|
|||
|
||||
handleModChange({targetConf, targetIndex, newValue}) {
|
||||
|
||||
console.log('NEW VALUE', newValue);
|
||||
const oldCats = this.state.catToOrderedMods;
|
||||
const newCats = Object.keys(this.state.catToOrderedMods).reduce((acc, cat) => {
|
||||
|
||||
|
|
|
@ -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)}
|
||||
>
|
||||
|
|
|
@ -96,7 +96,7 @@ export default function getProxyEditor(theState) {
|
|||
font-weight: 900;
|
||||
}
|
||||
table.editor .export {
|
||||
padding-right: 2px;
|
||||
/*padding-right: 2px;*/
|
||||
}
|
||||
|
||||
/* LAST COLUMN: BUTTONS */
|
||||
|
|
Loading…
Reference in New Issue
Block a user