Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
npm
common
Commits
fc2d2436
Commit
fc2d2436
authored
Jan 23, 2019
by
Vladislav Lagunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Удалена обертка из BooleanField
parent
e89a1982
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
fields/BooleanField.tsx
+5
-4
No files found.
fields/BooleanField.tsx
View file @
fc2d2436
...
@@ -8,7 +8,7 @@ import { StandardProps } from '@material-ui/core';
...
@@ -8,7 +8,7 @@ import { StandardProps } from '@material-ui/core';
// Props
// Props
export
type
Props
=
StandardProps
<
React
.
HTMLProps
<
HTMLDivElement
>
,
ClassKey
,
'value
'
>
&
FieldProps
<
boolean
>
&
{
export
type
Props
=
StandardProps
<
SwitchProps
,
ClassKey
,
'value'
|
'disabled
'
>
&
FieldProps
<
boolean
>
&
{
alignLeft
?:
boolean
;
alignLeft
?:
boolean
;
}
}
...
@@ -28,16 +28,17 @@ class BooleanField extends React.Component<Props> {
...
@@ -28,16 +28,17 @@ class BooleanField extends React.Component<Props> {
[
classes
.
alignLeft
]:
alignLeft
,
[
classes
.
alignLeft
]:
alignLeft
,
});
});
return
<
div
{
...
rest
}
>
return
(
<
Switch
<
Switch
{
...
rest
}
className=
{
rootClass
}
className=
{
rootClass
}
checked=
{
value
}
checked=
{
value
}
onChange=
{
this
.
handleChange
}
onChange=
{
this
.
handleChange
}
disabled=
{
disabled
}
disabled=
{
Boolean
(
disabled
)
}
data
-
rh
-
at=
"right"
data
-
rh
-
at=
"right"
data
-
rh=
{
typeof
(
error
)
===
'string'
||
typeof
(
error
)
===
'function'
?
typeof
(
error
)
===
'string'
?
error
:
error
(
ctx
)
:
undefined
}
data
-
rh=
{
typeof
(
error
)
===
'string'
||
typeof
(
error
)
===
'function'
?
typeof
(
error
)
===
'string'
?
error
:
error
(
ctx
)
:
undefined
}
/>
/>
</
div
>
;
)
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment