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
695dd1fe
Commit
695dd1fe
authored
Dec 04, 2018
by
Vladislav Lagunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Suggestions] Исправлено позиционирование попапов
parent
2db2033b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
fields/AutoComplete.tsx
+0
-3
fields/Suggestions.tsx
+3
-2
No files found.
fields/AutoComplete.tsx
View file @
695dd1fe
...
@@ -210,14 +210,12 @@ export default class AutoComplete<A=string> extends React.Component<Props<A> & {
...
@@ -210,14 +210,12 @@ export default class AutoComplete<A=string> extends React.Component<Props<A> & {
renderSeeMoreLink
()
{
renderSeeMoreLink
()
{
const
{
__
,
classes
}
=
this
.
props
;
const
{
__
,
classes
}
=
this
.
props
;
const
{
total
,
query
:
{
limit
,
offset
}
}
=
this
.
state
;
const
{
total
,
query
:
{
limit
,
offset
}
}
=
this
.
state
;
if
(
total
!==
0
&&
limit
+
offset
>=
total
)
return
null
;
if
(
total
!==
0
&&
limit
+
offset
>=
total
)
return
null
;
return
<
ListItem
className=
{
classes
!
.
seeMore
}
>
return
<
ListItem
className=
{
classes
!
.
seeMore
}
>
<
a
href=
"javascript://void 0"
onMouseDown=
{
this
.
handleSeeMore
}
>
{
__
(
'See more'
)
}
</
a
>
<
a
href=
"javascript://void 0"
onMouseDown=
{
this
.
handleSeeMore
}
>
{
__
(
'See more'
)
}
</
a
>
</
ListItem
>;
</
ListItem
>;
}
}
render
()
{
render
()
{
const
{
className
,
fullWidth
,
children
,
ctx
,
source
,
debounce
,
renderItem
,
printItem
,
openOnFocus
,
openOnClick
,
suggestionProps
,
keepOpenAfterSelect
,
textFieldProps
,
classes
,
anchorEl
,
observable
,
...
rest
}
=
this
.
props
;
const
{
className
,
fullWidth
,
children
,
ctx
,
source
,
debounce
,
renderItem
,
printItem
,
openOnFocus
,
openOnClick
,
suggestionProps
,
keepOpenAfterSelect
,
textFieldProps
,
classes
,
anchorEl
,
observable
,
...
rest
}
=
this
.
props
;
const
{
suggestions
,
open
,
pending
}
=
this
.
state
;
const
{
suggestions
,
open
,
pending
}
=
this
.
state
;
...
@@ -225,7 +223,6 @@ export default class AutoComplete<A=string> extends React.Component<Props<A> & {
...
@@ -225,7 +223,6 @@ export default class AutoComplete<A=string> extends React.Component<Props<A> & {
[
classes
!
.
fullWidth
!
]:
fullWidth
[
classes
!
.
fullWidth
!
]:
fullWidth
});
});
return
<
div
{
...
rest
}
className=
{
rootClass
}
>
return
<
div
{
...
rest
}
className=
{
rootClass
}
>
{
!
observable
&&
(
children
?
React
.
cloneElement
(
children
,
this
.
childrenProps
())
:
<
TextField
{
...
this
.
childrenProps
()
as
any
}
{
...
textFieldProps
}
/>)
}
{
!
observable
&&
(
children
?
React
.
cloneElement
(
children
,
this
.
childrenProps
())
:
<
TextField
{
...
this
.
childrenProps
()
as
any
}
{
...
textFieldProps
}
/>)
}
<
Suggestions
<
Suggestions
...
...
fields/Suggestions.tsx
View file @
695dd1fe
...
@@ -161,9 +161,10 @@ class Suggestions<A> extends React.Component<Props<A>, State> {
...
@@ -161,9 +161,10 @@ class Suggestions<A> extends React.Component<Props<A>, State> {
let
top
=
anchorRect
.
bottom
+
4
;
let
top
=
anchorRect
.
bottom
+
4
;
const
bottom
=
top
+
rectHeight
const
bottom
=
top
+
rectHeight
if
(
bottom
>
heightThreshold
&&
anchorRect
.
top
-
window
.
scrollY
-
rectHeight
-
8
>
marginThreshold
)
{
if
(
bottom
>
heightThreshold
&&
anchorRect
.
top
-
window
.
scrollY
-
rectHeight
-
8
>
marginThreshold
)
{
t
op
=
anchorRect
.
top
-
8
-
rectHeight
;
t
his
.
paperEl
.
style
.
bottom
=
-
(
anchorRect
.
top
-
8
)
+
'px'
;
}
}
else
{
this
.
paperEl
.
style
.
top
=
top
+
'px'
;
this
.
paperEl
.
style
.
top
=
top
+
'px'
;
}
this
.
paperEl
.
style
.
left
=
anchorRect
.
left
+
'px'
;
this
.
paperEl
.
style
.
left
=
anchorRect
.
left
+
'px'
;
this
.
paperEl
.
style
.
minWidth
=
anchorRect
.
width
+
'px'
;
this
.
paperEl
.
style
.
minWidth
=
anchorRect
.
width
+
'px'
;
};
};
...
...
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