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

s2禁用选中高亮不生效🤔 #2468

Closed
4 tasks
p-al-ace opened this issue Dec 11, 2023 · 4 comments
Closed
4 tasks

s2禁用选中高亮不生效🤔 #2468

p-al-ace opened this issue Dec 11, 2023 · 4 comments
Labels
❔question 疑问/使用问题

Comments

@p-al-ace
Copy link

🏷 Version

Package Version
@antv/s2 1.52.1
@antv/s2-react 1.44.3

Sheet Type

  • [ ✅ ] PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

interaction: {
selectedCellHighlight: {
rowHeader: false,
colHeader: false,
currentRow: false,
currentCol: false,
},
selectedCellsSpotlight: false,
},
这样配置后,点击单元格时该单元格会高亮;点击行头时该行会高亮

🔗 Reproduce Link

😊 Expected Behavior

😅 Current Behavior

@p-al-ace p-al-ace added the ❔question 疑问/使用问题 label Dec 11, 2023
Copy link
Contributor

你要找的是不是 (You may look for issues):

  1. 100% s2禁用选中高亮不生效🤔 #2467

@lijinke666
Copy link
Member

lijinke666 commented Dec 12, 2023

正如文档所说, selectedCellHighlight 是配置选中数值单元格后对应的行列的联动, 和你期望的不是一回事

image

目前没有相关配置项, 后面会改进这块, 确实容易造成疑惑, 如果你期望的是禁用数值单元格的选中高亮, 以及对应的行列多选, 可以参考这个示例

const stateTheme = {
  cell: {
    interactionState: {
      selected: {
        backgroundColor: 'transparent',
        borderColor: 'transparent',
      },
    },
  },
};
 
const s2ThemeConfig = {
  theme: {
    rowCell: stateTheme,
    colCell: stateTheme,
    dataCell: stateTheme,
  },
};


<SheetComponent themeCfg={s2ThemeConfig}/>

@lijinke666
Copy link
Member

ref #2439

@p-al-ace
Copy link
Author

正如文档所说, selectedCellHighlight 是配置选中数值单元格后对应的行列的联动, 和你期望的不是一回事

image

目前没有相关配置项, 后面会改进这块, 确实容易造成疑惑, 如果你期望的是禁用数值单元格的选中高亮, 以及对应的行列多选, 可以参考这个示例

const stateTheme = {
  cell: {
    interactionState: {
      selected: {
        backgroundColor: 'transparent',
        borderColor: 'transparent',
      },
    },
  },
};
 
const s2ThemeConfig = {
  theme: {
    rowCell: stateTheme,
    colCell: stateTheme,
    dataCell: stateTheme,
  },
};


<SheetComponent themeCfg={s2ThemeConfig}/>

解决了,非常感谢👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❔question 疑问/使用问题
Projects
None yet
Development

No branches or pull requests

2 participants