Skip to content

[BUG] <title> table 列fixed,点击整行变色,选中的行变色,但是fixed的单元格没有变化 #3084

@vincent-cong

Description

@vincent-cong

Is there an existing issue for this?

  • I have searched the existing issues

Which Component

table

Semi Version

2.88.3

Current Behavior

Image

Expected Behavior

期望和 hover 一样 点击选中的行设置颜色之后 fixed的需要设置颜色

或者加个默认的属性 选中行 整行变色

Steps To Reproduce

No response

ReproducibleCode

const rowSelection = {
    selectedRowKeys: selectedKeys,
    onChange: (selectedRowKeys: (string | number)[] | undefined) => {
      setSelectedKeys(selectedRowKeys || []);
    },
    fixed: true,
  };

  const handelRowClick = (record: any) => ({
    onClick: () => {
      const rowKey = record.key;
      const isSelected = selectedKeys.includes(rowKey);
      if (isSelected) {
        setSelectedKeys(
          selectedKeys.filter((key: string | number) => key !== rowKey)
        );
      } else {
        setSelectedKeys([...selectedKeys, rowKey]);
      }
    },
    style: {
      background: selectedKeys.includes(record.key)
        ? 'var(--semi-color-fill-0)'
        : 'transparent',
    },
  });

Environment

- OS:
- browser:

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions