ant-design/pro-components

🐛[BUG]protable 启用search会警告

Closed this issue · 1 comments

🐛 bug 描述

protable 启用search会警告

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of DomWrapper which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node

💻 复现代码

<>
            <EditableProTable<DataSourceType>
                rowKey="token_id"
                headerTitle="Token管理"
                maxLength={11}
                scroll={{
                    x: 960,
                }}
                recordCreatorProps={
                    {
                        position: position as 'top',
                        record: () => ({ token_id: (Math.random() * 1000000).toFixed(0) }),
                    }
                }
                loading={false}
                search={{}}
                toolBarRender={() => [
                    <ProFormRadio.Group
                        key="render"
                        fieldProps={{
                            value: position,
                            onChange: (e) => setPosition(e.target.value),
                        }}
                        options={[
                            {
                                label: '添加到顶部',
                                value: 'top',
                            },
                            {
                                label: '添加到底部',
                                value: 'bottom',
                            },
                            {
                                label: '隐藏',
                                value: 'hidden',
                            },
                        ]}
                    />,
                ]}
                columns={columns}
                pagination={{ pageSize:pageSize,current:current,showSizeChanger:true}}
                params={{}}
                request={...一些逻辑}
                actionRef={actionRef}
                value={dataSource}
                onChange={setDataSource}
                editable={...一些逻辑}
            />
            <ProCard title="表格数据" headerBordered collapsible defaultCollapsed>
                <ProFormField
                    ignoreFormItem
                    fieldProps={{
                        style: {
                            width: '100%',
                        },
                    }}
                    mode="read"
                    valueType="jsonCode"
                    text={JSON.stringify(dataSource)}
                />
            </ProCard>
        </>

🏞 期望结果

不希望出现警告

© 版本信息

  • ProComponents 版本: [2.7.1]
    -nextjs版本:[14.1.4]
  • 浏览器环境[edge浏览器]
  • 开发环境 [win11]

🚑 其他信息

image