We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProTable requests 会发送两次请求
<ProTable rowSelection={{ // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom // 注释该行则默认不显示下拉选项 selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT], }} tableAlertRender={({ selectedRowKeys, onCleanSelected, }) => { setCurrentReqId(selectedRowKeys) return ( <Space size={24}> <span> 已选 {selectedRowKeys.length} 项 <a style={{marginInlineStart: 8}} onClick={onCleanSelected}> 取消选择 </a> </span> </Space> ); }} columns={columns} request={async (params, sorter, filter) => { console.log("++++++++++++++++") if (!filter.type) { filter.type = ['FuR'] } if (!filter.version) { filter.version = ['RB_V5R15C10'] } const datasource = await getReqItem(params, sorter, filter) setParamsFilter(datasource.filter_items) return datasource }} rowKey="reqId" pagination={{ showQuickJumper: true, }} search={{ layout: 'vertical', defaultCollapsed: false, }} dateFormatter="string" toolbar={{ title: '特性表格', // tooltip: '这是一个标题提示', }} toolBarRender={() => [ <Button type="primary" key="primary" onClick={onExportExcel}> 下载特性excel </Button>, <Button type="primary" key="primary" onClick={onExportRiskExcel}> 下载风险excel </Button>, ]} />
The text was updated successfully, but these errors were encountered:
request 里 setParamsFilter 触发依赖更新了
setParamsFilter
Sorry, something went wrong.
onInlt 慢一些的,oinit 之后还会执行一下,可能params 就发生变化了
No branches or pull requests
🐛 bug 描述
ProTable requests 会发送两次请求
📷 复现步骤
🏞 期望结果
💻 复现代码
© 版本信息
🚑 其他信息
The text was updated successfully, but these errors were encountered: