打开 关闭

Datatables previous ajax requests are not cancelled when making subsequent requests #1063


User avatar
0
michael.sudnik 创建
  • ABP Framework version: v4.2.1
  • UI type: MVC
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

If I set the page size to a large number (e.g. 500), a request is pending. If I then subsequently change the page size to a small number (e.g. 10) the request is created and completed relatively quickly. The previous request is then still pending, and eventually completes resulting in the table being incorrectly updated.

Is there a way to cancel previous requests automatically when calling dataTable.ajax.reload()? Or is there a way to manually cancel a previous request?

I have looked at this file, but cannot figure out what to do to change the behaviour: https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js


5 答案
  • User Avatar
    0
    maliming 创建
    支持团队 Fullstack Developer

    hi

    Please follow this issue: https://github.com/abpframework/abp/pull/8145

  • User Avatar
    0
    michael.sudnik 创建

    Thabks for that.

    Are you also planning to modify datatables-extensions to automatically handle the abort if there is a pending request?

  • User Avatar
    0
    maliming 创建
    支持团队 Fullstack Developer

    hi michael.sudnik

    I will try to provier a option.

  • User Avatar
    0
    maliming 创建
    支持团队 Fullstack Developer

    Please follow this PR https://github.com/abpframework/abp/pull/8160

  • User Avatar
    0
    ServiceBot 创建
    支持团队 Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v8.2.0-preview Updated on 三月 25, 2024, 15:11