Skip to content

Commit 691ba9b

Browse files
committed
Wrap toolbar buttons and update toolbar CSS
1 parent df47c7b commit 691ba9b

File tree

2 files changed

+54
-54
lines changed

2 files changed

+54
-54
lines changed

src/LoreSoft.Blazor.Controls/Data/DataGridToolbar.razor

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -30,53 +30,55 @@
3030
{
3131
@FilterTemplate(CurrentGrid)
3232
}
33-
@if (ShowRefresh)
34-
{
35-
<button name="refresh-button"
36-
title="Refresh Data"
37-
class="toolbar-button"
38-
type="button"
39-
@onclick="HandelRefresh">
40-
<i class="toolbar-icon toolbar-refresh-icon"></i>
41-
</button>
42-
}
43-
@if (ShowExport)
44-
{
45-
<button name="export-button"
46-
title="Export Data"
47-
class="toolbar-button"
48-
type="button"
49-
@onclick="HandelExport">
50-
<i class="toolbar-icon toolbar-export-icon"></i>
51-
</button>
52-
}
53-
@if (ShowFilter)
54-
{
55-
<button name="filter-button"
56-
title="Filter Data"
57-
class="toolbar-button"
58-
type="button"
59-
@onclick="ToggleFilter">
60-
@if (CurrentGrid.IsFilterActive())
61-
{
62-
<i class="toolbar-icon toolbar-filter-active-icon"></i>
63-
}
64-
else
65-
{
66-
<i class="toolbar-icon toolbar-filter-icon"></i>
67-
}
68-
</button>
69-
}
70-
@if (ShowColumnPicker)
71-
{
72-
<button name="column-picker-button"
73-
title="Column Picker"
74-
class="toolbar-button"
75-
type="button"
76-
@onclick="ToggleColumnPicker">
77-
<i class="toolbar-icon toolbar-column-picker-icon"></i>
78-
</button>
79-
}
33+
<div class="toolbar-button-bar">
34+
@if (ShowRefresh)
35+
{
36+
<button name="refresh-button"
37+
title="Refresh Data"
38+
class="toolbar-button"
39+
type="button"
40+
@onclick="HandelRefresh">
41+
<i class="toolbar-icon toolbar-refresh-icon"></i>
42+
</button>
43+
}
44+
@if (ShowExport)
45+
{
46+
<button name="export-button"
47+
title="Export Data"
48+
class="toolbar-button"
49+
type="button"
50+
@onclick="HandelExport">
51+
<i class="toolbar-icon toolbar-export-icon"></i>
52+
</button>
53+
}
54+
@if (ShowFilter)
55+
{
56+
<button name="filter-button"
57+
title="Filter Data"
58+
class="toolbar-button"
59+
type="button"
60+
@onclick="ToggleFilter">
61+
@if (CurrentGrid.IsFilterActive())
62+
{
63+
<i class="toolbar-icon toolbar-filter-active-icon"></i>
64+
}
65+
else
66+
{
67+
<i class="toolbar-icon toolbar-filter-icon"></i>
68+
}
69+
</button>
70+
}
71+
@if (ShowColumnPicker)
72+
{
73+
<button name="column-picker-button"
74+
title="Column Picker"
75+
class="toolbar-button"
76+
type="button"
77+
@onclick="ToggleColumnPicker">
78+
<i class="toolbar-icon toolbar-column-picker-icon"></i>
79+
</button>
80+
}
81+
</div>
8082
@if (ActionTemplate != null)
8183
{
8284
@ActionTemplate(CurrentGrid)

src/LoreSoft.Blazor.Controls/wwwroot/css/data-toolbar.css

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,18 @@
1717
display: flex;
1818
align-items: center;
1919
flex-wrap: wrap;
20-
justify-content: end;
21-
gap: .25rem .125rem;
20+
gap: .325rem .125rem;
2221
}
2322

2423
.data-toolbar .toolbar-title {
2524
margin-left: var(--dt-title-margin);
2625
margin-right: auto;
27-
min-width: 0;
2826
flex: 1;
29-
overflow: hidden;
3027
}
3128

3229
.data-toolbar .toolbar-title .toolbar-title-text {
3330
margin: 0;
3431
white-space: nowrap;
35-
overflow: hidden;
36-
text-overflow: ellipsis;
3732
}
3833

3934
.data-toolbar select,
@@ -128,6 +123,9 @@
128123
/* Mobile responsive styles */
129124
@media (max-width: 768px) {
130125
.data-toolbar .toolbar-search-box {
131-
display: none;
126+
width: 100%;
127+
}
128+
.data-toolbar .toolbar-control {
129+
width: 100%;
132130
}
133131
}

0 commit comments

Comments
 (0)