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
d3972095
Commit
d3972095
authored
Oct 15, 2018
by
Vladislav Lagunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправлена ошибка в Zoom
parent
b12dd411
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
Zoom.tsx
+1
-1
context.tsx
+6
-4
No files found.
Zoom.tsx
View file @
d3972095
...
...
@@ -15,7 +15,7 @@ export type Props = StandardProps<React.HTMLProps<HTMLDivElement>, string> & {
const
zoomOnChange
=
memoize
((
path
:
ObjectKey
[],
onChange
:
((
x
:
any
,
at
:
ObjectPath
)
=>
void
)
|
undefined
)
=>
{
return
(
next
,
at
=
[])
=>
{
onChange
&&
onChange
(
next
,
[...
at
,
...
path
]);
onChange
&&
onChange
(
next
,
[...
path
,
...
at
]);
};
})
...
...
context.tsx
View file @
d3972095
import
*
as
React
from
'react'
;
import
{
AuthCtx
as
Ctx
}
from
'~/context'
;
import
{
I18nString
}
from
'
@bitmaster/utils
/gettext'
;
import
{
I18nString
}
from
'
~
/gettext'
;
import
{
ObjectPath
}
from
'~/utils'
;
import
*
as
gettext
from
'~/gettext'
;
const
hoistNonReactStatics
=
require
(
'hoist-non-react-statics'
);
...
...
@@ -14,7 +13,7 @@ export interface FieldProps<Value=any> {
ctx
?:
Ctx
;
value
?:
Value
;
disabled
?:
Disabled
;
error
?:
Error
;
error
?:
Error
|
Validation
<
any
>
;
FieldWrapper
?:
React
.
ComponentType
;
onValueChange
?(
value
:
Value
,
at
?:
ObjectPath
):
void
;
onFocus
?(
e
?:
React
.
SyntheticEvent
):
void
;
...
...
@@ -72,4 +71,7 @@ export type Disabled = boolean|DisabledRecord;
export
interface
ErrorRecord
{
[
K
:
string
]:
Error
;
}
export
type
Error
=
boolean
|
I18nString
|
string
|
ErrorRecord
|
gettext
.
I18nString
;
export
type
Error
=
boolean
|
string
|
ErrorRecord
|
I18nString
;
export
type
Validation
<
A
>
=
Partial
<
Record
<
keyof
A
,
Error
>>
;
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