Skip to content

Commit 94e9e02

Browse files
fixed issue with being able to select "disabled" tabs
1 parent 46aabd3 commit 94e9e02

File tree

3 files changed

+27
-28
lines changed

3 files changed

+27
-28
lines changed

components/component-docs.json

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10115,7 +10115,7 @@
1011510115
}
1011610116
},
1011710117
"required": true,
10118-
"description": "**Array of locations objects for the Map component.**\n Each location object can contain:\n * `id` : A unique identifier string for the location\n * `name` : Name of the location\n * `address` : Address of the location"
10118+
"description": "Array of locations objects for the Map component.**\nEach location object can contain:\n * `id` : A unique identifier string for the location\n * `name` : Name of the location\n * `address` : Address of the location"
1011910119
},
1012010120
"onClickLocation": {
1012110121
"type": {
@@ -15339,22 +15339,17 @@
1533915339
"returns": null
1534015340
},
1534115341
{
15342-
"name": "getMasterViewId",
15342+
"name": "getIsOpen",
1534315343
"docblock": null,
1534415344
"modifiers": [],
1534515345
"params": [],
1534615346
"returns": null
1534715347
},
1534815348
{
15349-
"name": "setIsOpen",
15349+
"name": "getMasterViewId",
1535015350
"docblock": null,
1535115351
"modifiers": [],
15352-
"params": [
15353-
{
15354-
"name": "{ isOpen }",
15355-
"type": null
15356-
}
15357-
],
15352+
"params": [],
1535815353
"returns": null
1535915354
},
1536015355
{
@@ -15368,13 +15363,6 @@
1536815363
}
1536915364
],
1537015365
"returns": null
15371-
},
15372-
{
15373-
"name": "masterContent",
15374-
"docblock": null,
15375-
"modifiers": [],
15376-
"params": [],
15377-
"returns": null
1537815366
}
1537915367
],
1538015368
"props": {
@@ -15806,7 +15794,7 @@
1580615794
}
1580715795
},
1580815796
"required": false,
15809-
"description": "Event Callbacks\n* `onSelect`: Called when a list item is selected.\n * event {object} List item click event\n * Meta {object}\n * selectedItems {array} List of selected items.\n * item {object} Last selected item.\n* `onSort`: Called when the list is sorted.\n * event {object} Sort click event",
15797+
"description": "Event Callbacks\n* `onSelect`: Called when a list item is selected. Previously, this event was called when an item was focused. The UX pattern has changed and this event is now called on pressing enter or mouse click.\n * event {object} List item click event\n * Meta {object}\n * selectedItems {array} List of selected items.\n * item {object} Last selected item.\n* `onSort`: Called when the list is sorted.\n * event {object} Sort click event",
1581015798
"defaultValue": {
1581115799
"value": "{}",
1581215800
"computed": false

components/tabs/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ function isTabNode(node) {
4545

4646
// Determine if a tab node is disabled
4747
function isTabDisabled(node) {
48-
if (node.getAttribute) {
48+
if (node.classList && node.classList.contains('slds-disabled')) {
49+
return true;
50+
} else if (node.getAttribute) {
4951
return node.getAttribute('aria-disabled') === 'true';
5052
}
5153

styles/tabs/tab.css

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
1-
.slds-tabs--default .slds-tabs--default__item.slds-disabled,
2-
.slds-tabs--scoped .slds-tabs--scoped__item.slds-disabled {
1+
.slds-tabs_default .slds-tabs_default__item.slds-disabled,
2+
.slds-tabs_scoped .slds-tabs_scoped__item.slds-disabled {
33
opacity: 0.5;
44
}
5-
.slds-tabs--default .slds-tabs--default__item.slds-disabled > a:hover,
6-
.slds-tabs--scoped .slds-tabs--scoped__item.slds-disabled > a:hover,
7-
.slds-tabs--default .slds-tabs--default__item.slds-disabled > a.slds-tabs--default__link:focus,
8-
.slds-tabs--scoped .slds-tabs--scoped__item.slds-disabled > a.slds-tabs--scoped__link:focus {
5+
.slds-tabs_default .slds-tabs_default__item.slds-disabled > a:hover,
6+
.slds-tabs_scoped .slds-tabs_scoped__item.slds-disabled > a:hover,
7+
.slds-tabs_default .slds-tabs_default__item.slds-disabled > a.slds-tabs_default__link:focus,
8+
.slds-tabs_scoped .slds-tabs_scoped__item.slds-disabled > a.slds-tabs_scoped__link:focus {
99
cursor: not-allowed;
1010
text-decoration: none;
1111
border-color: transparent;
1212
color: inherit;
1313
}
14-
.slds-tabs--default .slds-tabs--default__item.slds-disabled.slds-active a.slds-tabs--default__link,
15-
.slds-tabs--scoped .slds-tabs--scoped__item.slds-disabled.slds-active a.slds-tabs--scoped__link {
14+
.slds-tabs_default .slds-tabs_default__item.slds-disabled.slds-active a.slds-tabs_default__link,
15+
.slds-tabs_scoped .slds-tabs_scoped__item.slds-disabled.slds-active a.slds-tabs_scoped__link {
1616
cursor: not-allowed;
1717
border-color: transparent;
1818
color: inherit;
1919
}
20-
.slds-tabs--default .slds-tabs--default__item.slds-disabled.slds-active a.slds-tabs--default__link:focus,
21-
.slds-tabs--scoped .slds-tabs--scoped__item.slds-disabled.slds-active a.slds-tabs--scoped__link:focus {
20+
.slds-tabs_default .slds-tabs_default__item.slds-disabled.slds-active a.slds-tabs_default__link:focus,
21+
.slds-tabs_scoped .slds-tabs_scoped__item.slds-disabled.slds-active a.slds-tabs_scoped__link:focus {
2222
cursor: not-allowed;
2323
color: inherit;
2424
}
25+
26+
.slds-tabs_default__item.slds-disabled:focus:after,
27+
.slds-tabs_default__item.slds-disabled.slds-has-focus:after,
28+
.slds-tabs_scoped__item.slds-disabled:focus:after,
29+
.slds-tabs_scoped__item.slds-disabled.slds-has-focus:after {
30+
height: 0.125rem;
31+
background-color: #007add;
32+
transition: height 300ms;
33+
}

0 commit comments

Comments
 (0)