Skip to content

Commit 43438e8

Browse files
committed
feat: change labels and fix styling
1 parent d1d3194 commit 43438e8

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

packages/modules/data-widgets/src/themesource/datawidgets/web/_datagrid.scss

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ $root: ".widget-datagrid";
526526

527527
.widget-datagrid .widget-datagrid-load-more {
528528
display: block !important;
529-
margin: 0;
529+
margin: var(--spacing-small, 8px) 0;
530530
}
531531

532532
.infinite-loading.widget-datagrid-grid-body {
@@ -564,9 +564,6 @@ $root: ".widget-datagrid";
564564
:where(#{$root}-pb-start, #{$root}-tb-start, #{$root}-pb-end, #{$root}-tb-end, #{$root}-pb-middle) {
565565
flex-grow: 1;
566566
flex-basis: 33.33%;
567-
min-height: 20px;
568-
height: 54px;
569-
padding: var(--spacing-small) 0;
570567
}
571568

572569
:where(#{$root}-pb-middle) {
@@ -575,7 +572,6 @@ $root: ".widget-datagrid";
575572
}
576573

577574
:where(#{$root}-pb-start, #{$root}-tb-start) {
578-
padding-inline: var(--spacing-medium);
579575
display: flex;
580576
align-items: center;
581577
}
@@ -596,6 +592,13 @@ $root: ".widget-datagrid";
596592
}
597593
}
598594

595+
:where(#{$root}-selection-counter) {
596+
display: flex;
597+
align-items: center;
598+
height: 54px;
599+
padding: var(--spacing-small) var(--spacing-medium);
600+
}
601+
599602
:where(#{$root}-select-all-bar) {
600603
grid-column: 1 / -1;
601604
background-color: #f0f1f2;

packages/pluggableWidgets/datagrid-web/src/Datagrid.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,17 @@
211211
</enumerationValues>
212212
</property>
213213
<property key="showSelectAllToggle" type="boolean" defaultValue="true">
214-
<caption>Show (un)check all toggle</caption>
215-
<description>Show a checkbox in the grid header to check or uncheck multiple items.</description>
214+
<caption>"Select all" checkbox</caption>
215+
<description>Displays a checkbox in the grid header that allows selecting or deselecting all rows on the current page.</description>
216+
</property>
217+
<property key="enableSelectAll" type="boolean" defaultValue="false">
218+
<caption>"Select all" across pages</caption>
219+
<description>Shows a banner with the option to select all rows across all pages when all rows on the current page are selected.</description>
216220
</property>
217221
<property key="keepSelection" type="boolean" defaultValue="false">
218222
<caption>Keep selection</caption>
219223
<description>If enabled, selected items will stay selected unless cleared by the user or a Nanoflow.</description>
220224
</property>
221-
<property key="enableSelectAll" type="boolean" defaultValue="false">
222-
<caption>Enable select all</caption>
223-
<description>Allow select all through multiple pages (based on current filter).</description>
224-
</property>
225225
<property key="selectionCounterPosition" type="enumeration" defaultValue="bottom" required="true">
226226
<caption>Show selection count</caption>
227227
<description />
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { observer } from "mobx-react-lite";
2-
import { Fragment } from "react";
32
import { useSelectionCounterViewModel } from "../deps-hooks";
43
import { useLegacyContext } from "../helpers/root-context";
54

@@ -8,14 +7,14 @@ export const SelectionCounter = observer(function SelectionCounter() {
87
const { selectActionHelper } = useLegacyContext();
98

109
return (
11-
<Fragment>
12-
<span className="widget-datagrid-selection-count" aria-live="polite" aria-atomic="true">
10+
<div className="widget-datagrid-selection-counter">
11+
<span className="widget-datagrid-selection-text" aria-live="polite" aria-atomic="true">
1312
{selectionCountStore.selectedCountText}
1413
</span>
1514
&nbsp;
1615
<button className="widget-datagrid-btn-link" onClick={selectActionHelper.onClearSelection}>
1716
{selectionCountStore.clearButtonLabel}
1817
</button>
19-
</Fragment>
18+
</div>
2019
);
2120
});

packages/pluggableWidgets/datagrid-web/typings/DatagridProps.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ export interface DatagridContainerProps {
102102
itemSelectionMethod: ItemSelectionMethodEnum;
103103
itemSelectionMode: ItemSelectionModeEnum;
104104
showSelectAllToggle: boolean;
105-
keepSelection: boolean;
106105
enableSelectAll: boolean;
106+
keepSelection: boolean;
107107
selectionCounterPosition: SelectionCounterPositionEnum;
108108
loadingType: LoadingTypeEnum;
109109
refreshIndicator: boolean;
@@ -161,8 +161,8 @@ export interface DatagridPreviewProps {
161161
itemSelectionMethod: ItemSelectionMethodEnum;
162162
itemSelectionMode: ItemSelectionModeEnum;
163163
showSelectAllToggle: boolean;
164-
keepSelection: boolean;
165164
enableSelectAll: boolean;
165+
keepSelection: boolean;
166166
selectionCounterPosition: SelectionCounterPositionEnum;
167167
loadingType: LoadingTypeEnum;
168168
refreshIndicator: boolean;

0 commit comments

Comments
 (0)