@ukhomeoffice/cop-react-form-renderer 3.23.1 → 3.23.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,26 +12,26 @@ describe('components', function () {
|
|
|
12
12
|
describe('helpers', function () {
|
|
13
13
|
describe('getRelevantPages', function () {
|
|
14
14
|
var pages = [{
|
|
15
|
-
|
|
15
|
+
id: 'page1'
|
|
16
16
|
}, {
|
|
17
|
-
|
|
17
|
+
id: 'page2'
|
|
18
18
|
}, {
|
|
19
|
-
|
|
19
|
+
id: 'page3'
|
|
20
20
|
}, {
|
|
21
|
-
|
|
21
|
+
id: 'page4'
|
|
22
22
|
}, {
|
|
23
|
-
|
|
23
|
+
id: 'page5'
|
|
24
24
|
}];
|
|
25
25
|
var taskListPages = [{
|
|
26
|
-
|
|
26
|
+
id: 'taskPage1'
|
|
27
27
|
}, {
|
|
28
|
-
|
|
28
|
+
id: 'taskPage2'
|
|
29
29
|
}, {
|
|
30
|
-
|
|
30
|
+
id: 'taskPage3'
|
|
31
31
|
}, {
|
|
32
|
-
|
|
32
|
+
id: 'taskPage4'
|
|
33
33
|
}, {
|
|
34
|
-
|
|
34
|
+
id: 'taskPage5'
|
|
35
35
|
}];
|
|
36
36
|
it('return all pages from the start of the given list to the current page outside of a task when the page type is partial-cya', function () {
|
|
37
37
|
var formState = {
|
|
@@ -11,7 +11,13 @@ var getRowActionAttributes = function getRowActionAttributes(row) {
|
|
|
11
11
|
return {
|
|
12
12
|
onClick: function onClick() {
|
|
13
13
|
return row.action.onAction(row);
|
|
14
|
-
}
|
|
14
|
+
},
|
|
15
|
+
onKeyPress: function onKeyPress(event) {
|
|
16
|
+
if (event.key === 'Enter') {
|
|
17
|
+
row.action.onAction(row);
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
tabIndex: '0'
|
|
15
21
|
};
|
|
16
22
|
} else if (row.action.page) {
|
|
17
23
|
return {
|