mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-21 08:13:49 +08:00
Add empty list item and expand menu by default
This commit is contained in:
@ -19,8 +19,12 @@ import {LayoutOutlined} from "@ant-design/icons";
|
||||
class ChatMenu extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
const items = this.chatsToItems(this.props.chats);
|
||||
const openKeys = items.map((item) => item.key);
|
||||
|
||||
this.state = {
|
||||
openKeys: ["0"],
|
||||
openKeys: openKeys,
|
||||
selectedKeys: ["0-0"],
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user