From 1182802e18c40a4f99326197e8359584ba420676 Mon Sep 17 00:00:00 2001 From: Barrior Date: Thu, 13 Jun 2024 16:34:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/search-table-react/src/SearchTable.tsx | 4 ++-- packages/search-table-react/src/typings/index.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/search-table-react/src/SearchTable.tsx b/packages/search-table-react/src/SearchTable.tsx index fb1ca73..01f7a85 100644 --- a/packages/search-table-react/src/SearchTable.tsx +++ b/packages/search-table-react/src/SearchTable.tsx @@ -82,8 +82,8 @@ const SearchTable = ( searchRef.current?.setValue(nextValue) }, clearSearchValue: () => searchRef.current?.resetValue(), - getTableData: () => dataSource, - setTableDataAndRender: (data) => { + getDataSource: () => dataSource, + setDataSourceAndRender: (data) => { setDataSource(data) forceUpdate() }, diff --git a/packages/search-table-react/src/typings/index.d.ts b/packages/search-table-react/src/typings/index.d.ts index ca71c6f..3bf8515 100644 --- a/packages/search-table-react/src/typings/index.d.ts +++ b/packages/search-table-react/src/typings/index.d.ts @@ -145,11 +145,11 @@ export interface ISearchTableRef { /** * 获取表格列表数据 */ - getTableData: () => IRequestResult['data'] + getDataSource: () => IRequestResult['data'] /** * 设置表格列表数据 */ - setTableDataAndRender: (dataSource: IObjectAny[]) => void + setDataSourceAndRender: (dataSource: IObjectAny[]) => void /** * 获取搜索参数 */