@jbrowse/plugin-grid-bookmark 2.6.2 → 2.6.3
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.
|
@@ -53,7 +53,7 @@ const BookmarkGrid = (0, mobx_react_1.observer)(({ model }) => {
|
|
|
53
53
|
const { classes } = useStyles();
|
|
54
54
|
const [dialogRowNumber, setDialogRowNumber] = (0, react_1.useState)();
|
|
55
55
|
const { bookmarkedRegions, selectedAssembly } = model;
|
|
56
|
-
const
|
|
56
|
+
const session = (0, util_1.getSession)(model);
|
|
57
57
|
const bookmarkRows = bookmarkedRegions
|
|
58
58
|
.filter(r => selectedAssembly === 'all' || r.assemblyName === selectedAssembly)
|
|
59
59
|
.map((region, index) => {
|
|
@@ -73,7 +73,7 @@ const BookmarkGrid = (0, mobx_react_1.observer)(({ model }) => {
|
|
|
73
73
|
width: (0, util_1.measureGridWidth)(bookmarkRows.map(row => row.locString)),
|
|
74
74
|
renderCell: params => (react_1.default.createElement(material_1.Link, { className: classes.link, href: "#", onClick: async (event) => {
|
|
75
75
|
event.preventDefault();
|
|
76
|
-
await (0, utils_1.navToBookmark)(params.value, views, model);
|
|
76
|
+
await (0, utils_1.navToBookmark)(params.value, session.views, model);
|
|
77
77
|
} }, params.value)),
|
|
78
78
|
},
|
|
79
79
|
{
|
|
@@ -91,7 +91,12 @@ const BookmarkGrid = (0, mobx_react_1.observer)(({ model }) => {
|
|
|
91
91
|
} },
|
|
92
92
|
react_1.default.createElement(Delete_1.default, null))),
|
|
93
93
|
},
|
|
94
|
-
],
|
|
94
|
+
], processRowUpdate: row => {
|
|
95
|
+
model.updateBookmarkLabel(row.id, row.label);
|
|
96
|
+
return row;
|
|
97
|
+
}, onProcessRowUpdateError: e => {
|
|
98
|
+
session.notify(e.message, 'error');
|
|
99
|
+
}, disableRowSelectionOnClick: true }),
|
|
95
100
|
react_1.default.createElement(DeleteBookmark_1.default, { rowNumber: dialogRowNumber, model: model, onClose: () => setDialogRowNumber(undefined) })));
|
|
96
101
|
});
|
|
97
102
|
function GridBookmarkWidget({ model }) {
|
|
@@ -25,7 +25,7 @@ const BookmarkGrid = observer(({ model }) => {
|
|
|
25
25
|
const { classes } = useStyles();
|
|
26
26
|
const [dialogRowNumber, setDialogRowNumber] = useState();
|
|
27
27
|
const { bookmarkedRegions, selectedAssembly } = model;
|
|
28
|
-
const
|
|
28
|
+
const session = getSession(model);
|
|
29
29
|
const bookmarkRows = bookmarkedRegions
|
|
30
30
|
.filter(r => selectedAssembly === 'all' || r.assemblyName === selectedAssembly)
|
|
31
31
|
.map((region, index) => {
|
|
@@ -45,7 +45,7 @@ const BookmarkGrid = observer(({ model }) => {
|
|
|
45
45
|
width: measureGridWidth(bookmarkRows.map(row => row.locString)),
|
|
46
46
|
renderCell: params => (React.createElement(Link, { className: classes.link, href: "#", onClick: async (event) => {
|
|
47
47
|
event.preventDefault();
|
|
48
|
-
await navToBookmark(params.value, views, model);
|
|
48
|
+
await navToBookmark(params.value, session.views, model);
|
|
49
49
|
} }, params.value)),
|
|
50
50
|
},
|
|
51
51
|
{
|
|
@@ -63,7 +63,12 @@ const BookmarkGrid = observer(({ model }) => {
|
|
|
63
63
|
} },
|
|
64
64
|
React.createElement(DeleteIcon, null))),
|
|
65
65
|
},
|
|
66
|
-
],
|
|
66
|
+
], processRowUpdate: row => {
|
|
67
|
+
model.updateBookmarkLabel(row.id, row.label);
|
|
68
|
+
return row;
|
|
69
|
+
}, onProcessRowUpdateError: e => {
|
|
70
|
+
session.notify(e.message, 'error');
|
|
71
|
+
}, disableRowSelectionOnClick: true }),
|
|
67
72
|
React.createElement(DeleteBookmarkDialog, { rowNumber: dialogRowNumber, model: model, onClose: () => setDialogRowNumber(undefined) })));
|
|
68
73
|
});
|
|
69
74
|
function GridBookmarkWidget({ model }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-grid-bookmark",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"description": "JBrowse 2 grid bookmark widget",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"distModule": "esm/index.js",
|
|
59
59
|
"srcModule": "src/index.ts",
|
|
60
60
|
"module": "esm/index.js",
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "ed402c87efb0904858d602c363bd1757d5742129"
|
|
62
62
|
}
|