ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.04k stars 1.29k forks source link

🐛[BUG]ProTable删除第二页最后一条数据,页码跳转了上一页 #8292

Open dmhxdtl opened 1 month ago

dmhxdtl commented 1 month ago

3031712712734_ pic

yxf168 commented 2 days ago

我也遇到了同样的问题

yxf168 commented 2 days ago

将最后一页数据全部删掉后,页面未自动显示最新的最后一页数据, 期望: 删除最后一页最后一条数据时,自动跳转到前一页,请求前一页的数据

yxf168 commented 2 days ago
<Popconfirm
  placement="topRight"
  title="确定删除?"
  description="删除后不可恢复"
  onConfirm={async () => {
    await serviceClient.connectMG.delRabbitMq(record.id);
    // action?.reloadAndRest?.();
    console.log('[ action?.pageInfo1 ]', action?.pageInfo)
    action?.reload();
    console.log('[ action?.pageInfo2 ]', action?.pageInfo)
    // setTimeout(() => {
    // action?.reload();
    // }, 3000);
    message.success("操作成功");
  }}
  >
  <Button type="link" danger>
    删除
  </Button>
  </Popconfirm>