@workday/canvas-kit-docs 8.5.5 → 8.5.7
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.
|
@@ -32,9 +32,9 @@ export default () => {
|
|
|
32
32
|
* @param id The id of the item that will be removed
|
|
33
33
|
*/
|
|
34
34
|
const removeItem = <T extends unknown>(id: string, model: ReturnType<typeof useTabsModel>) => {
|
|
35
|
-
const index = model.state.items.findIndex(item =>
|
|
35
|
+
const index = model.state.items.findIndex(item => item.id === model.state.cursorId);
|
|
36
36
|
const nextIndex = index === model.state.items.length - 1 ? index - 1 : index + 1;
|
|
37
|
-
const nextId = model.
|
|
37
|
+
const nextId = model.state.items[nextIndex].id;
|
|
38
38
|
if (model.state.selectedIds[0] === id) {
|
|
39
39
|
// We're removing the currently selected item. Select next item
|
|
40
40
|
model.events.select({id: nextId});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.7",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@emotion/styled": "^11.6.0",
|
|
46
46
|
"@storybook/csf": "0.0.1",
|
|
47
|
-
"@workday/canvas-kit-labs-react": "^8.5.
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^8.5.
|
|
49
|
-
"@workday/canvas-kit-react": "^8.5.
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^8.5.7",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^8.5.7",
|
|
49
|
+
"@workday/canvas-kit-react": "^8.5.7",
|
|
50
50
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
51
51
|
"markdown-to-jsx": "^6.10.3",
|
|
52
52
|
"ts-node": "^10.9.1"
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"mkdirp": "^1.0.3",
|
|
58
58
|
"typescript": "4.2"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "09d7397731b0293381977f381dd068edfd159696"
|
|
61
61
|
}
|