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

[Bug] 点击第一列头在click_cell时间中 调用updateColumns后,第一列的选中状态会消失 #975

Closed
zhijun0451 opened this issue Jan 22, 2024 · 2 comments · Fixed by #985
Assignees
Labels
bug Something isn't working

Comments

@zhijun0451
Copy link

Version

0.18.1

Link to Minimal Reproduction

Steps to Reproduce

Current Behavior

点击第一列头在click_cell时间中 调用updateColumns后,第一列的选中状态会消失

Expected Behavior

点击第一列头在click_cell时间中 调用updateColumns后,第一列的选中状态会消失

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

const tableInstance = new VTable.ListTable(listTableRef.value, option);

tableInstance.on("click_cell", (params) => {
  // console.log(params);
  if (params.row == 0) {
    for (let i = 0; i < columns.length; i++) {
      var col = tableInstance.columns[i];

      if (params.field == col.field) {
        if (col.style == null) {
          col.style = { color: "#000" };
        } else {
          col.style.color = "#000";
        }
      } else {
        if (col.style == null) {
          col.style = { color: "#e4e4e4" };
        } else {
          col.style.color = "#e4e4e4";
        }
      }
    } // end for

    tableInstance.updateColumns(tableInstance.columns);
  }
});
@zhijun0451 zhijun0451 added the bug Something isn't working label Jan 22, 2024
@fangsmile
Copy link
Contributor

收到 我们看下

@zhijun0451
Copy link
Author

zhijun0451 commented Jan 22, 2024 via email

@fangsmile fangsmile self-assigned this Jan 23, 2024
@fangsmile fangsmile linked a pull request Jan 24, 2024 that will close this issue
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants