0
形成しています。これを行うには、私は、次のスキーマとUiSchema使用:は私がトグルボタンを作成する必要が<a href="https://github.com/mozilla-services/react-jsonschema-form" rel="nofollow noreferrer">react-jsonschema-form</a></p> <p>使用してフォームを作成しようとしている
const Schema = {
customCheckboxComponent: {
type: 'string',
title: 'toggle button'
} };
const UISchema = {
customCheckboxComponent: {
"ui:widget": (props) => {
return (
<label className="switch">
<input type="checkbox"
className="col-xs-12 custom"
title={props.title}
value={props.value}
onChange={(event) => props.onChange(event.target.value)}/>
<span className="slider round"/>
</label>
);
};
をそして私は、CSSがw3Schoolsを提供し使用しています:
は、私は、このトグルボタンの状態を取得できませんでした。あたかもトグルボタンの状態が変わらないかのようです!
これについて私に手伝ってもらえますか?