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
3c61627a
Unverified
Commit
3c61627a
authored
Apr 07, 2020
by
Hugo Häggmark
Committed by
GitHub
Apr 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReactTable: adds alignment options (#23389)
parent
cf437093
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
packages/grafana-ui/src/components/Table/Table.tsx
+1
-5
public/app/plugins/panel/table2/module.tsx
+14
-0
No files found.
packages/grafana-ui/src/components/Table/Table.tsx
View file @
3c61627a
...
...
@@ -96,11 +96,7 @@ export const Table: FC<Props> = memo(({ data, height, onCellClick, width, column
function
renderHeaderCell
(
column
:
any
,
className
:
string
,
field
?:
Field
)
{
const
headerProps
=
column
.
getHeaderProps
(
column
.
getSortByToggleProps
());
const
fieldTextAlign
=
getTextAlign
(
field
);
if
(
fieldTextAlign
)
{
headerProps
.
style
.
textAlign
=
fieldTextAlign
;
}
headerProps
.
style
.
textAlign
=
getTextAlign
(
field
);
return
(
<
div
className=
{
className
}
{
...
headerProps
}
>
...
...
public/app/plugins/panel/table2/module.tsx
View file @
3c61627a
...
...
@@ -17,6 +17,20 @@ export const plugin = new PanelPlugin<Options, CustomFieldConfig>(TablePanel)
max
:
300
,
},
})
.
addRadio
({
path
:
'align'
,
name
:
'Column alignment'
,
description
:
'column alignment (for table)'
,
settings
:
{
options
:
[
{
label
:
'auto'
,
value
:
null
},
{
label
:
'left'
,
value
:
'left'
},
{
label
:
'center'
,
value
:
'center'
},
{
label
:
'right'
,
value
:
'right'
},
],
},
defaultValue
:
null
,
})
.
addSelect
({
path
:
'displayMode'
,
name
:
'Cell display mode'
,
...
...
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