-
-
diff --git a/apps/demos/Demos/TreeView/ItemSelectionAndCustomization/jQuery/index.js b/apps/demos/Demos/TreeView/ItemSelectionAndCustomization/jQuery/index.js
index 0fbdb2e1d3c6..2b97862abd1b 100644
--- a/apps/demos/Demos/TreeView/ItemSelectionAndCustomization/jQuery/index.js
+++ b/apps/demos/Demos/TreeView/ItemSelectionAndCustomization/jQuery/index.js
@@ -13,6 +13,7 @@ $(() => {
width: 340,
height: 320,
showCheckBoxesMode: 'normal',
+ disabledNodeSelectionMode: 'never',
onSelectionChanged(e) {
syncSelection(e.component);
},
@@ -62,6 +63,15 @@ $(() => {
},
}).dxSelectBox('instance');
+ $('#disabledNodeSelectionMode').dxSelectBox({
+ items: ['never', 'recursiveAndAll'],
+ inputAttr: { 'aria-label': 'Disabled Node Selection Mode' },
+ value: 'never',
+ onValueChanged(e) {
+ treeView.option('disabledNodeSelectionMode', e.value);
+ },
+ });
+
const recursiveCheckBox = $('#selectNodesRecursive').dxCheckBox({
text: 'Select Nodes Recursive',
value: true,
diff --git a/apps/demos/Demos/TreeView/ItemSelectionAndCustomization/jQuery/styles.css b/apps/demos/Demos/TreeView/ItemSelectionAndCustomization/jQuery/styles.css
index 8580eace021f..d8dd0b37daa4 100644
--- a/apps/demos/Demos/TreeView/ItemSelectionAndCustomization/jQuery/styles.css
+++ b/apps/demos/Demos/TreeView/ItemSelectionAndCustomization/jQuery/styles.css
@@ -37,7 +37,7 @@
}
.option {
- width: 24%;
+ width: 30%;
margin-top: 10px;
margin-right: 9px;
box-sizing: border-box;
@@ -48,8 +48,11 @@
.options-container {
display: flex;
- justify-content: space-between;
- align-items: stretch;
+ flex-direction: column;
+}
+
+.options-section {
+ display: flex;
}
.editor-container {
diff --git a/apps/demos/menuMeta.json b/apps/demos/menuMeta.json
index d734d49535b0..2df5e0acaae5 100644
--- a/apps/demos/menuMeta.json
+++ b/apps/demos/menuMeta.json
@@ -5809,6 +5809,7 @@
"Name": "ItemSelectionAndCustomization",
"DocUrl": "Guide/UI_Components/TreeView/Select_Nodes/",
"Widget": "TreeView",
+ "Badge": "Updated",
"MvcAdditionalFiles": [
"/Models/TreeView/Employee.cs",
"/Models/SampleData/TreeViewHierarchicalDataForSelection.cs"
diff --git a/apps/demos/testing/etalons/TreeView-ItemSelectionAndCustomization (fluent.blue.light).png b/apps/demos/testing/etalons/TreeView-ItemSelectionAndCustomization (fluent.blue.light).png
index 3dbc4bd91bfc..63c7fa96540a 100644
Binary files a/apps/demos/testing/etalons/TreeView-ItemSelectionAndCustomization (fluent.blue.light).png and b/apps/demos/testing/etalons/TreeView-ItemSelectionAndCustomization (fluent.blue.light).png differ
diff --git a/apps/demos/testing/etalons/TreeView-ItemSelectionAndCustomization (material.blue.light).png b/apps/demos/testing/etalons/TreeView-ItemSelectionAndCustomization (material.blue.light).png
index 93656571cb31..0067cdf8c51e 100644
Binary files a/apps/demos/testing/etalons/TreeView-ItemSelectionAndCustomization (material.blue.light).png and b/apps/demos/testing/etalons/TreeView-ItemSelectionAndCustomization (material.blue.light).png differ
diff --git a/apps/demos/testing/widgets/treeview/ItemSelectionAndCustomization.test.ts b/apps/demos/testing/widgets/treeview/ItemSelectionAndCustomization.test.ts
index 34108520ef35..bc681e7d9908 100644
--- a/apps/demos/testing/widgets/treeview/ItemSelectionAndCustomization.test.ts
+++ b/apps/demos/testing/widgets/treeview/ItemSelectionAndCustomization.test.ts
@@ -5,14 +5,18 @@ import { testScreenshot } from '../../../utils/visual-tests/helpers/theme-utils'
const OPTION_CLASS = 'option';
const SELECTBOX_CLASS = 'dx-selectbox';
+const SELECTBOX_POPUP_WRAPPER_CLASS = 'dx-selectbox-popup-wrapper';
+const LIST_ITEM_CLASS = 'dx-list-item';
+const TREEVIEW_NODE_CLASS = 'dx-treeview-node';
+const CHECKBOX_CLASS = 'dx-checkbox';
fixture('TreeView.ItemSelectionAndCustomization')
.before(async (ctx) => {
- ctx.initialWindowSize = [900, 1200];
+ ctx.initialWindowSize = [900, 800];
});
runManualTest('TreeView', 'ItemSelectionAndCustomization', (test) => {
- test('ItemSelectionAndCustomization', async (t) => {
+ test('Open select box', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
await t
@@ -24,4 +28,31 @@ runManualTest('TreeView', 'ItemSelectionAndCustomization', (test) => {
.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
});
+
+ test('Disabled Node Selection Mode', async (t) => {
+ const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
+
+ const rootNodeCheckbox = $(`.${TREEVIEW_NODE_CLASS} .${CHECKBOX_CLASS}`).nth(0);
+
+ await t
+ .click(rootNodeCheckbox);
+
+ await testScreenshot(t, takeScreenshot, 'treeview_disabled_node_selection_mode_never.png');
+
+ await t
+ .click(rootNodeCheckbox)
+ .click($(`.${OPTION_CLASS} .${SELECTBOX_CLASS}`).nth(2))
+ .click($(`.${SELECTBOX_POPUP_WRAPPER_CLASS} .${LIST_ITEM_CLASS}`).nth(1));
+
+ await testScreenshot(t, takeScreenshot, 'treeview_disabled_node_selection_mode_recursive_and_all.png');
+
+ await t
+ .click(rootNodeCheckbox);
+
+ await testScreenshot(t, takeScreenshot, 'treeview_disabled_node_selection_mode_select_all_children.png');
+
+ await t
+ .expect(compareResults.isValid())
+ .ok(compareResults.errorMessages());
+ });
});
diff --git a/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_never (fluent.blue.light).png b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_never (fluent.blue.light).png
new file mode 100644
index 000000000000..503d773947e7
Binary files /dev/null and b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_never (fluent.blue.light).png differ
diff --git a/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_never (material.blue.light).png b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_never (material.blue.light).png
new file mode 100644
index 000000000000..cbfef25c1b8c
Binary files /dev/null and b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_never (material.blue.light).png differ
diff --git a/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_recursive_and_all (fluent.blue.light).png b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_recursive_and_all (fluent.blue.light).png
new file mode 100644
index 000000000000..8a87b4e159b1
Binary files /dev/null and b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_recursive_and_all (fluent.blue.light).png differ
diff --git a/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_recursive_and_all (material.blue.light).png b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_recursive_and_all (material.blue.light).png
new file mode 100644
index 000000000000..5b7d335a7ca0
Binary files /dev/null and b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_recursive_and_all (material.blue.light).png differ
diff --git a/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_select_all_children (fluent.blue.light).png b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_select_all_children (fluent.blue.light).png
new file mode 100644
index 000000000000..2fcdeb27b159
Binary files /dev/null and b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_select_all_children (fluent.blue.light).png differ
diff --git a/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_select_all_children (material.blue.light).png b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_select_all_children (material.blue.light).png
new file mode 100644
index 000000000000..dff0d38497ce
Binary files /dev/null and b/apps/demos/testing/widgets/treeview/etalons/treeview_disabled_node_selection_mode_select_all_children (material.blue.light).png differ
diff --git a/apps/demos/testing/widgets/treeview/etalons/treeview_selection_field_is_open (fluent.blue.light).png b/apps/demos/testing/widgets/treeview/etalons/treeview_selection_field_is_open (fluent.blue.light).png
index 0291604502ef..28ce3486dd99 100644
Binary files a/apps/demos/testing/widgets/treeview/etalons/treeview_selection_field_is_open (fluent.blue.light).png and b/apps/demos/testing/widgets/treeview/etalons/treeview_selection_field_is_open (fluent.blue.light).png differ
diff --git a/apps/demos/testing/widgets/treeview/etalons/treeview_selection_field_is_open (material.blue.light).png b/apps/demos/testing/widgets/treeview/etalons/treeview_selection_field_is_open (material.blue.light).png
index 68ab3a4a9fc9..055130220eb6 100644
Binary files a/apps/demos/testing/widgets/treeview/etalons/treeview_selection_field_is_open (material.blue.light).png and b/apps/demos/testing/widgets/treeview/etalons/treeview_selection_field_is_open (material.blue.light).png differ