summaryrefslogtreecommitdiff
path: root/src/components/Config.js
diff options
context:
space:
mode:
authorHaishan <[email protected]>2020-06-07 18:15:07 +0800
committerHaishan <[email protected]>2020-06-07 18:41:12 +0800
commite864feb4016739c0f5f2925257d2e7a6dc88f74d (patch)
tree266cb906a5f17331db5ff28f6bf49ae91f8e1789 /src/components/Config.js
parent201f6904c2d822d4d862ba39b8706de726eb7148 (diff)
fix: mode not display correctly due to clash API change
for https://github.com/haishanh/yacd/issues/491
Diffstat (limited to 'src/components/Config.js')
-rw-r--r--src/components/Config.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/Config.js b/src/components/Config.js
index 46c480d..8f6e396 100644
--- a/src/components/Config.js
+++ b/src/components/Config.js
@@ -27,15 +27,15 @@ const propsList = [{ id: 0 }, { id: 1 }, { id: 2 }, { id: 3 }];
const optionsRule = [
{
label: 'Global',
- value: 'Global',
+ value: 'global',
},
{
label: 'Rule',
- value: 'Rule',
+ value: 'rule',
},
{
label: 'Direct',
- value: 'Direct',
+ value: 'direct',
},
];
@@ -220,7 +220,7 @@ function ConfigImpl({
<ToggleSwitch
options={optionsRule}
name="mode"
- value={configState.mode}
+ value={configState.mode && configState.mode.toLowerCase()}
onChange={handleInputOnChange}
/>
</div>