Skip to content
New issue

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 column固定列不自适应宽度(没设置width) #8792

Open
dream-dargon opened this issue Oct 16, 2024 · 0 comments

Comments

@dream-dargon
Copy link

dream-dargon commented Oct 16, 2024

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🧐 问题描述

protable column不设置width,可以使单元格自适应,目前不设置width,不能够使固定列自适应宽度,想知道是不是内部布局计算的问题还是其他的问题导致的?

💻 示例代码

const columns = [{
title: '操作',
dataIndex: 'option',
valueType: 'option',
fixed: 'right',
align: 'center',
render: (_, row) => {
return <>
修改商户

详情

修改电池

删除
</>
}
}]

<ProTable
actionRef={actionRef}
formRef={formRef}
rowKey="id"
search={{
layout: 'vertical',
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
],
}}
collapsed={false}
toolBarRender={() => []}
request={handleFetchData}
columns={columns}
scroll={{ x: 'max-content' }}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}
/>

🚑 其他信息

@dream-dargon dream-dargon changed the title 🧐[问题]protable column不设置width,单元格不自适应宽度 🧐[问题]protable column不设置width,固定列不自适应宽度 Oct 16, 2024
@dream-dargon dream-dargon changed the title 🧐[问题]protable column不设置width,固定列不自适应宽度 🧐[问题]protable column固定列不自适应宽度(没设置width) Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant