Skip to content

Commit

Permalink
page supports sourcePath
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jul 3, 2024
1 parent 92c7a7d commit e9e0262
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/app/src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const hideFlyover = () => {
state.flyoverData = null;
};
const showFlyover = (rowItem) => {
const showFlyover = (rowItem, page) => {
if (!state.flyoverVisible) {
state.flyoverEndPromise = new Promise((resolve) => {
Expand All @@ -221,6 +221,10 @@ const showFlyover = (rowItem) => {
state.flyoverTitle = ft;
state.flyoverVisible = true;
if (rowItem.id === page || rowItem.sourcePath === page) {
return;
}
hash.set('page', rowItem.id);
};
Expand All @@ -230,11 +234,11 @@ const displayFlyoverWithHash = () => {
if (page) {
const grid = state.grid;
if (grid) {
const rowItem = grid.getRowItemById(page);
const rowItem = grid.getRowItemBy('id', page) || grid.getRowItemBy('sourcePath', page);
if (rowItem) {
grid.scrollRowIntoView(rowItem);
grid.setRowSelected(rowItem);
showFlyover(rowItem);
showFlyover(rowItem, page);
return;
}
}
Expand Down

0 comments on commit e9e0262

Please sign in to comment.