Advanced Table

Row Interaction

SubRow Headers

Year
New Enrollments
Scheduled Meetings
Attendance Rate
Completed Classes
Class Completion Rate
Graduated Students
2021
20
10
51%
3
33%
19
Quarter
Q1
2
35
32%
15
52%
36
Month
January
16
20
11%
13
47%
28
Day
10
34
28
97%
20
15%
17
20
43
23
66%
26
47%
9
February
20
41
95%
26
83%
43
Day
15
19
35
69%
8
75%
23
2022
25
17
75%
5
45%
32
Quarter
Q1
2
35
32%
15
52%
36
Month
January
16
20
11%
13
47%
28
Day
15
34
28
97%
20
15%
17
25
43
23
66%
26
47%
9
May
20
41
95%
26
83%
43
Day
2
19
35
69%
8
75%
23
2023
10
15
65%
4
49%
29
Quarter
Q1
2
35
32%
15
52%
36
Month
March
16
20
11%
13
47%
28
Day
10
34
28
97%
20
15%
17
11
43
23
66%
26
47%
9
April
20
41
95%
26
83%
43
Day
15
19
35
69%
8
75%
23

subrow_headers is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.

enable_toggle_expansion is an additional optional prop that can be used in conjunction with the subRowHeaders prop. enable_toggle_expansion is a string that can be "all", "header" or "none". If set to "all", the toggle expansion button will appear in the table header as well as in the subRow headers. If set to "header", the button will only appear in header and NOT in subRow headers. This prop is set to "header" by default.

Pinned Rows


Use the pinned_rows prop to pin specific rows to the top of an Advanced Table. Pinned rows will remain at the top when scrolling through table data and will not change position if sorting is used.

NOTE:

  • Sticky header required: Pinned rows must be used with sticky: true via table_props (works with both responsive and non-responsive tables)
  • Row ids required: Each object within the table_data array must contain a unique id in order to attach an id to all Rows for this to function.
  • pinned_rows takes a hash with a top key containing an array of row ids, as shown in the code snippet below.
  • For expandable rows, use the parent id in pinned_rows[:top]; all its children will automatically be pinned with it. If a child id is passed without the parent being pinned, nothing will be pinned.
Selectable Rows

Year
New Enrollments
Scheduled Meetings
Attendance Rate
Completed Classes
Class Completion Rate
Graduated Students
2021
20
10
51%
3
33%
19
Quarter
Q1
2
35
32%
15
52%
36
Month
January
16
20
11%
13
47%
28
Day
10
34
28
97%
20
15%
17
20
43
23
66%
26
47%
9
February
20
41
95%
26
83%
43
Day
15
19
35
69%
8
75%
23
2022
25
17
75%
5
45%
32
Quarter
Q1
2
35
32%
15
52%
36
Month
January
16
20
11%
13
47%
28
Day
15
34
28
97%
20
15%
17
25
43
23
66%
26
47%
9
May
20
41
95%
26
83%
43
Day
2
19
35
69%
8
75%
23
2023
10
15
65%
4
49%
29
Quarter
Q1
2
35
32%
15
52%
36
Month
March
16
20
11%
13
47%
28
Day
10
34
28
97%
20
15%
17
11
43
23
66%
26
47%
9
April
20
41
95%
26
83%
43
Day
15
19
35
69%
8
75%
23

selectable_rows is a boolean prop that if present will add checkboxes to all rows that will allow for selecting rows.

When a parent row is clicked, it will check all nested children rows, Children rows can be manually checked or unchecked as well.

The data attribute data-selected-rows on the parent pb_advanced_table div will update dynamically with each selection to show an array of ids corresponding to the current selection.

NOTE: Each object within the table_data Array must contain a unique id in order to attach an id to all Rows for this to function.

Selectable Rows (No Subrows)

Year
New Enrollments
Scheduled Meetings
Attendance Rate
Completed Classes
Class Completion Rate
Graduated Students
2021
20
10
51%
3
33%
19
2022
25
17
75%
5
45%
32
2023
10
15
65%
4
49%
29
2024
15
34
32%
6
67%
65

selectable_rows can also be used with tables without nested row data. Set enable_toggle_expansion: none to adjust the Advanced Table styling to fit a table without subrows.

The data attribute data-selected-rows on the parent pb_advanced_table div will update dynamically with each selection to show an array of ids corresponding to the current selection.

NOTE: Each object within the table_data Array must contain a unique id in order to attach an id to all Rows for this to function.

Selectable Rows (With Actions)

Year
New Enrollments
Scheduled Meetings
Attendance Rate
Completed Classes
Class Completion Rate
Graduated Students
2021
20
10
51%
3
33%
19
2022
25
17
75%
5
45%
32
2023
10
15
65%
4
49%
29
2024
15
34
32%
6
67%
65

Custom actions content can be rendered within the Actions Bar as shown in this doc example. The component passed to actions will be rendered on the right of the actionsBar.

You can utilize script tags with your actions to provide your buttons with any clickable events needed.

Selectable Rows (No Actions Bar)

Year
New Enrollments
Scheduled Meetings
Attendance Rate
Completed Classes
Class Completion Rate
Graduated Students
2021
20
10
51%
3
33%
19
2022
25
17
75%
5
45%
32
2023
10
15
65%
4
49%
29
2024
15
34
32%
6
67%
65

show_actions_bar is an optional prop that renders the header at the top showing the row count. This is set to true by default but can be toggled off by setting it to false



Available Props

Props Type Values

gap

array
none
xxs
xs
sm
md
lg
xl

max_width

array
0%
xs
sm
md
lg
xl
xxl
0
none
100%

min_width

array
0%
xs
sm
md
lg
xl
xxl
0
none
100%

width

array
0%
xs
sm
md
lg
xl
xxl
0
none
100%

z_index

array
1
2
3
4
5
6
7
8
9
10
max

number_spacing

array
tabular

shadow

array
none
deep
deeper
deepest

line_height

array
tightest
tighter
tight
normal
loose
looser
loosest

display

array
block
inline_block
inline
flex
inline_flex
none
grid

cursor

array
auto
default
none
contextMenu
help
pointer
progress
wait
cell
crosshair
text
verticalText
alias
copy
move
noDrop
notAllowed
grab
grabbing
eResize
nResize
neResize
nwResize
sResize
seResize
swResize
wResize
ewResize
nsResize
neswResize
nwseResize
colResize
rowResize
allScroll
zoomIn
zoomOut

flex_direction

array
row
column
rowReverse
columnReverse

flex_wrap

array
wrap
nowrap
wrapReverse

justify_content

array
start
end
center
spaceBetween
spaceAround
spaceEvenly

justify_self

array
auto
start
end
center
stretch

align_items

array
flexStart
flexEnd
start
end
center
baseline
stretch

align_content

array
start
end
center
spaceBetween
spaceAround
spaceEvenly

align_self

array
auto
start
end
center
stretch
baseline

flex

array
auto
initial
0
1
2
3
4
5
6
7
8
9
10
11
12
none

flex_grow

array
1
0

flex_shrink

array
1
0

order

array
1
2
3
4
5
6
7
8
9
10
11
12

position

array
relative
absolute
fixed
sticky

hover

array

border_radius

array
none
xs
sm
md
lg
xl
rounded

text_align

array
start
end
left
right
center
justify
justify-all
match-parent

overflow

array
visible
hidden
scroll
auto

truncate

array
1
2
3
4
5

left

array
0
xxs
xs
sm
md
lg
xl
auto
initial
inherit

top

array
0
xxs
xs
sm
md
lg
xl
auto
initial
inherit

right

array
0
xxs
xs
sm
md
lg
xl
auto
initial
inherit

bottom

array
0
xxs
xs
sm
md
lg
xl
auto
initial
inherit

vertical_align

array
baseline
super
top
middle
bottom
sub
text-top
text-bottom

height

array
auto
xs
sm
md
lg
xl
xxl
xxxl

min_height

array
auto
xs
sm
md
lg
xl
xxl
xxxl

overflow_x

array
visible
hidden
scroll
auto

overflow_y

array
visible
hidden
scroll
auto

classname

string

dark

boolean

column_gap

string

row_gap

string

margin

array
none
xxs
xs
sm
md
lg
xl

margin_bottom

array
none
xxs
xs
sm
md
lg
xl

margin_left

array
none
xxs
xs
sm
md
lg
xl

margin_right

array
none
xxs
xs
sm
md
lg
xl

margin_top

array
none
xxs
xs
sm
md
lg
xl

margin_x

array
none
xxs
xs
sm
md
lg
xl

margin_y

array
none
xxs
xs
sm
md
lg
xl

padding

array
none
xxs
xs
sm
md
lg
xl

padding_bottom

array
none
xxs
xs
sm
md
lg
xl

padding_left

array
none
xxs
xs
sm
md
lg
xl

padding_right

array
none
xxs
xs
sm
md
lg
xl

padding_top

array
none
xxs
xs
sm
md
lg
xl

padding_x

array
none
xxs
xs
sm
md
lg
xl

padding_y

array
none
xxs
xs
sm
md
lg
xl

group_hover

boolean

id

string

data

hashprop

aria

hashprop

html_options

hashprop

children

proc

style

hashprop
Props Type Values Default

max_height

enum
auto
xs
sm
md
lg
xl
xxl
xxxl
auto

table_data

array

column_definitions

array

column_group_border_color

enum
text_lt_default
text_lt_light
text_lt_lighter
text_dk_default
text_dk_light
text_dk_lighter
none
none

enable_toggle_expansion

enum
all
header
none
header

loading

boolean
false

responsive

enum
none
scroll
scroll

table_props

hashprop

selectable_rows

boolean
false

show_actions_bar

boolean
true

actions

array

scroll_bar_none

boolean
false

row_styling

array

inline_row_loading

boolean
false

persist_toggle_expansion_button

boolean
false

pinned_rows

hashprop