Ant-design: 表格点击单行添加背景色

Created on 5 Dec 2016  ·  3Comments  ·  Source: ant-design/ant-design

单击表格第一行,该行背景色比如为蓝色,下次点击第二行,第二行背景色蓝色,第一行背景色蓝色取消,请问如何操作?不知道源码移动到某行上,背景色改变是如何操作的?

Usage

Most helpful comment

onRowClick 时记录需要高亮的行,在 rowClassName 给对应的行加 className

All 3 comments

onRowClick 时记录需要高亮的行,在 rowClassName 给对应的行加 className

Ant Design team use GitHub issues to trace bugs or discuss plans of Ant Design. So, please don't ask usage questions here. You can try to ask questions in Stack Overflow or Segment Fault, then apply tag antd and react to your questions.

You should read documentation & FAQ and search issues before ask a question, THX!

It will be better if you read smart questions(提问的智慧).

@benjycui I want to highlight rows that I selected,but I can't get the event target in rowSelection functions。

rowClassName works...

Was this page helpful?
0 / 5 - 0 ratings