From 49c24d9323c4cdcae61ee6989538849a418a0cea Mon Sep 17 00:00:00 2001
From: Andrei Mazol <72735611+AndreiMazol@users.noreply.github.com>
Date: Mon, 15 Mar 2021 15:43:43 +0300
Subject: [PATCH] #391 update rendering of SelectCheckbox component (#392)
---
.../script/ui/component/form/select-checkbox.jsx | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/packages/ketcher-react/src/script/ui/component/form/select-checkbox.jsx b/packages/ketcher-react/src/script/ui/component/form/select-checkbox.jsx
index 1d7828f830..18f11c3d00 100644
--- a/packages/ketcher-react/src/script/ui/component/form/select-checkbox.jsx
+++ b/packages/ketcher-react/src/script/ui/component/form/select-checkbox.jsx
@@ -17,12 +17,17 @@ import React from 'react'
import Input from './input'
function SelectCheckbox({ schema, ...props }) {
- const desc = {
- title: schema.title,
- enum: [true, false],
- enumNames: ['on', 'off']
+ let currentSchema = schema
+ if (schema.type === 'boolean') {
+ currentSchema = {
+ title: schema.title,
+ enum: [true, false],
+ enumNames: ['on', 'off'],
+ default: schema.default
+ }
}
- return
+
+ return
}
export default SelectCheckbox