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
ba197733
Unverified
Commit
ba197733
authored
Jan 09, 2019
by
Torkel Ödegaard
Committed by
GitHub
Jan 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14792 from grafana/adios-scrollbar
chore: Remove ScrollBar component, superseded by CustomScrollbar
parents
2d16c29a
6ab1abc1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
78 deletions
+0
-78
public/app/core/components/ScrollBar/ScrollBar.tsx
+0
-78
No files found.
public/app/core/components/ScrollBar/ScrollBar.tsx
deleted
100644 → 0
View file @
2d16c29a
import
React
from
'react'
;
import
baron
from
'baron'
;
export
interface
Props
{
children
:
any
;
className
:
string
;
}
export
default
class
ScrollBar
extends
React
.
Component
<
Props
,
any
>
{
private
container
:
any
;
private
scrollbar
:
baron
;
constructor
(
props
)
{
super
(
props
);
}
componentDidMount
()
{
this
.
scrollbar
=
baron
({
root
:
this
.
container
.
parentElement
,
scroller
:
this
.
container
,
bar
:
'.baron__bar'
,
barOnCls
:
'_scrollbar'
,
scrollingCls
:
'_scrolling'
,
track
:
'.baron__track'
,
});
}
componentDidUpdate
()
{
this
.
scrollbar
.
update
();
}
componentWillUnmount
()
{
this
.
scrollbar
.
dispose
();
}
// methods can be invoked by outside
setScrollTop
(
top
)
{
if
(
this
.
container
)
{
this
.
container
.
scrollTop
=
top
;
this
.
scrollbar
.
update
();
return
true
;
}
return
false
;
}
setScrollLeft
(
left
)
{
if
(
this
.
container
)
{
this
.
container
.
scrollLeft
=
left
;
this
.
scrollbar
.
update
();
return
true
;
}
return
false
;
}
update
()
{
this
.
scrollbar
.
update
();
}
handleRef
=
ref
=>
{
this
.
container
=
ref
;
};
render
()
{
return
(
<
div
className=
"baron baron__root baron__clipper"
>
<
div
className=
{
this
.
props
.
className
+
' baron__scroller'
}
ref=
{
this
.
handleRef
}
>
{
this
.
props
.
children
}
</
div
>
<
div
className=
"baron__track"
>
<
div
className=
"baron__bar"
/>
</
div
>
</
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