Skip to content

Commit 3753ecd

Browse files
sillyguodongGiteaBotlunny
authored
Update the value of the diffEnd when click Show More btn in the DiffFileTree (#24069)
In the component `DiffFileTree`,if don't update the value of the `diffEnd` in the callback of ajax request, click `Show More` btn will always return the same response, duplicate files are appended to the file list. Before: https://user-images.githubusercontent.com/33891828/231371188-82d169af-10bb-47e2-8aca-83ced2597f2d.mov After: https://user-images.githubusercontent.com/33891828/231369805-39a5a4d0-662c-4f08-bc5a-7d31e8782453.mov --------- Co-authored-by: Giteabot <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
1 parent 58b36cc commit 3753ecd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

web_src/js/components/DiffFileTree.vue

+2
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ export default {
145145
this.isLoadingNewData = true;
146146
doLoadMoreFiles(this.link, this.diffEnd, () => {
147147
this.isLoadingNewData = false;
148+
const {pageData} = window.config;
149+
this.diffEnd = pageData.diffFileInfo.diffEnd;
148150
});
149151
},
150152
},

0 commit comments

Comments
 (0)