ant-design-vue-pro icon indicating copy to clipboard operation
ant-design-vue-pro copied to clipboard

Antdv Table Refresh Programmatically in Vue

Open aysegulgurmeric opened this issue 4 years ago • 3 comments

I want to refresh programmatically table datasource. Is there a reload or refresh function of this component ?

Fetch method works but table doesn't show the current results when I fired 'fetch' function outside the table's change event.

aysegulgurmeric avatar Sep 28 '21 11:09 aysegulgurmeric

https://github.com/vueComponent/ant-design-vue-pro/blob/master/src/views/list/TableList.vue#L281

sendya avatar Sep 29 '21 02:09 sendya

Thank you sendya,

Here is my package info : "ant-design-vue": "^1.3.10",

When I try to use this.$refs.table.refresh(), I get this error as below:

index.vue?6ced:421 Uncaught (in promise) TypeError: _this2.$refs.table.refresh is not a function at eval

      <a-table
        ref="table"
        :columns="getColumns"
        :data-source="data"
        :scroll="{ x: 1000 }"
        style="min-height: 40vh"
        :loading="loading"
        :pagination="pagination"
        @change="handleTableChange"
        :locale="{
          filterConfirm: $t('OK'),
          filterReset: $t('Reset'),
          emptyText: $t('No Data'),
        }"
      >

aysegulgurmeric avatar Sep 29 '21 05:09 aysegulgurmeric

use s-table

sendya avatar Oct 08 '21 16:10 sendya