Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
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
Kornkitt Poolsup
nexpie-grafana-theme
Commits
e40d2145
Commit
e40d2145
authored
Dec 14, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing input unit test failure
parent
42ee81a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
public/app/core/components/Form/Input.tsx
+2
-1
public/app/core/components/Picker/Unit/UnitPicker.tsx
+20
-20
No files found.
public/app/core/components/Form/Input.tsx
View file @
e40d2145
import
React
,
{
PureComponent
}
from
'react'
;
import
React
,
{
PureComponent
}
from
'react'
;
import
classNames
from
'classnames'
;
import
{
ValidationEvents
,
ValidationRule
}
from
'app/types'
;
import
{
ValidationEvents
,
ValidationRule
}
from
'app/types'
;
import
{
validate
,
hasValidationEvent
}
from
'app/core/utils/validate'
;
import
{
validate
,
hasValidationEvent
}
from
'app/core/utils/validate'
;
...
@@ -80,7 +81,7 @@ export class Input extends PureComponent<Props> {
...
@@ -80,7 +81,7 @@ export class Input extends PureComponent<Props> {
render
()
{
render
()
{
const
{
validationEvents
,
className
,
hideErrorMessage
,
...
restProps
}
=
this
.
props
;
const
{
validationEvents
,
className
,
hideErrorMessage
,
...
restProps
}
=
this
.
props
;
const
{
error
}
=
this
.
state
;
const
{
error
}
=
this
.
state
;
const
inputClassName
=
'gf-form-input'
+
(
this
.
isInvalid
?
' invalid'
:
''
)
+
' '
+
className
;
const
inputClassName
=
classNames
(
'gf-form-input'
,
{
invalid
:
this
.
isInvalid
},
className
)
;
const
inputElementProps
=
this
.
populateEventPropsWithStatus
(
restProps
,
validationEvents
);
const
inputElementProps
=
this
.
populateEventPropsWithStatus
(
restProps
,
validationEvents
);
return
(
return
(
...
...
public/app/core/components/Picker/Unit/UnitPicker.tsx
View file @
e40d2145
...
@@ -36,25 +36,25 @@ export default class UnitPicker extends PureComponent<Props> {
...
@@ -36,25 +36,25 @@ export default class UnitPicker extends PureComponent<Props> {
};
};
});
});
const
styles
=
{
//
const styles = {
...
ResetStyles
,
//
...ResetStyles,
menu
:
()
=>
({
//
menu: () => ({
maxHeight
:
'75%'
,
//
maxHeight: '75%',
overflow
:
'scroll'
,
//
overflow: 'scroll',
}),
//
}),
menuList
:
()
=>
//
menuList: () =>
({
//
({
overflowY
:
'auto'
,
//
overflowY: 'auto',
position
:
'relative'
,
//
position: 'relative',
}
as
React
.
CSSProperties
),
//
} as React.CSSProperties),
valueContainer
:
()
=>
//
valueContainer: () =>
({
//
({
overflow
:
'hidden'
,
//
overflow: 'hidden',
textOverflow
:
'ellipsis'
,
//
textOverflow: 'ellipsis',
maxWidth
:
'90px'
,
//
maxWidth: '90px',
whiteSpace
:
'nowrap'
,
//
whiteSpace: 'nowrap',
}
as
React
.
CSSProperties
),
//
} as React.CSSProperties),
};
//
};
const
value
=
groupOptions
.
map
(
group
=>
{
const
value
=
groupOptions
.
map
(
group
=>
{
return
group
.
options
.
find
(
option
=>
option
.
value
===
defaultValue
);
return
group
.
options
.
find
(
option
=>
option
.
value
===
defaultValue
);
...
@@ -74,7 +74,7 @@ export default class UnitPicker extends PureComponent<Props> {
...
@@ -74,7 +74,7 @@ export default class UnitPicker extends PureComponent<Props> {
Group
:
UnitGroup
,
Group
:
UnitGroup
,
Option
:
UnitOption
,
Option
:
UnitOption
,
}
}
}
}
styles=
{
s
tyles
}
styles=
{
ResetS
tyles
}
/>
/>
);
);
}
}
...
...
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