mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-09 20:28:29 +03:00
Component handle fix
https://github.com/filecoin-project/slate/pull/45#pullrequestreview-442588150
This commit is contained in:
parent
18dc2aeb3f
commit
0e6b5c7129
@ -77,9 +77,9 @@ const TAB_GROUP_FOUR = [
|
||||
{`class ExampleOne extends React.Component {
|
||||
state = { exampleOne: '1' }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
@ -96,9 +96,9 @@ const TAB_GROUP_FOUR = [
|
||||
class ExampleTwo extends React.Component {
|
||||
state = { exampleTwo: '4' }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
|
@ -52,9 +52,9 @@ import { CheckBox } from 'slate-react-system';`}
|
||||
{`class ExampleOne extends React.Component {
|
||||
state = { exampleOne: false }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
@ -75,9 +75,9 @@ import { CheckBox } from 'slate-react-system';`}
|
||||
class ExampleTwo extends React.Component {
|
||||
state = { ExampleTwo: true }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
|
@ -115,9 +115,9 @@ const SELECT_MENU_MAP = {
|
||||
{`class ExampleOne extends React.Component {
|
||||
state = { exampleOne: '1' }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
@ -137,9 +137,9 @@ const SELECT_MENU_MAP = {
|
||||
class ExampleTwo extends React.Component {
|
||||
state = { exampleTwo: '3' }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
|
@ -55,9 +55,9 @@ import { Input, Textarea } from 'slate-react-system';`}
|
||||
{`class ExampleTextarea extends React.Component {
|
||||
state = { exampleOne: 'Example text' }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
@ -92,9 +92,9 @@ import { Input, Textarea } from 'slate-react-system';`}
|
||||
{`class ExampleLabel extends React.Component {
|
||||
state = { exampleTwo: null }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
@ -131,9 +131,9 @@ import { Input, Textarea } from 'slate-react-system';`}
|
||||
{`class ExampleMax extends React.Component {
|
||||
state = { exampleThree: null }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
@ -169,9 +169,9 @@ import { Input, Textarea } from 'slate-react-system';`}
|
||||
{`class ExampleCopyPaste extends React.Component {
|
||||
state = { exampleFour: 'aaaaa-bbbbb-ccccc-ddddd-eeee' }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
|
@ -115,9 +115,9 @@ import { RadioGroup } from 'slate-react-system';`}
|
||||
{`class ExampleOne extends React.Component {
|
||||
state = { ExampleOne: '2' }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
|
@ -46,9 +46,9 @@ import { TableContent, TableColumn } from 'slate-react-system';`}
|
||||
{`class ExampleOne extends React.Component {
|
||||
state = { exampleOne: null }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
|
@ -84,9 +84,9 @@ const TAB_GROUP_THREE = [
|
||||
{`class ExampleOne extends React.Component {
|
||||
state = { exampleOne: '1' }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
@ -104,9 +104,9 @@ const TAB_GROUP_THREE = [
|
||||
class ExampleTwo extends React.Component {
|
||||
state = { exampleTwo: '3' }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
|
@ -49,9 +49,9 @@ import { Toggle } from 'slate-react-system';`}
|
||||
{`class ExampleOne extends React.Component {
|
||||
state = { exampleOne: true }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
@ -68,9 +68,9 @@ import { Toggle } from 'slate-react-system';`}
|
||||
class ExampleTwo extends React.Component {
|
||||
state = { exampleTwo: false }
|
||||
|
||||
_handleChange = (e) => this._handleChange(
|
||||
_handleChange = e => this.setState(
|
||||
{ [e.target.name]: e.target.value }
|
||||
)
|
||||
);
|
||||
|
||||
render() {
|
||||
return(
|
||||
|
Loading…
Reference in New Issue
Block a user