mirror of
https://github.com/rustmailer/bichon.git
synced 2026-08-03 07:48:34 +02:00
fix: Inbox closed when it is already openend #122
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
base_url = "http://localhost:15630"
|
||||
api_token = "UvkGJO0Mn1tO6igGZwQnTtI2"
|
||||
api_token = "lZHmfpH1CRr9XsRiOGd1RnOr"
|
||||
|
||||
@@ -234,15 +234,24 @@ export function Mail({
|
||||
}
|
||||
}, [isError, error]);
|
||||
|
||||
const handleItemSelectionToggle = (
|
||||
// const handleItemSelectionToggle = (
|
||||
// _event: React.SyntheticEvent | null,
|
||||
// itemId: string,
|
||||
// isSelected: boolean,
|
||||
// ) => {
|
||||
// if (isSelected) {
|
||||
// setSelectedMailbox(mailboxes?.find(m => String(m.id) === itemId))
|
||||
// setPage(0);
|
||||
// }
|
||||
// };
|
||||
|
||||
const handleItemClick = (
|
||||
_event: React.SyntheticEvent | null,
|
||||
itemId: string,
|
||||
isSelected: boolean,
|
||||
itemId: string
|
||||
) => {
|
||||
if (isSelected) {
|
||||
setSelectedMailbox(mailboxes?.find(m => String(m.id) === itemId))
|
||||
setPage(0);
|
||||
}
|
||||
console.log(itemId)
|
||||
setSelectedMailbox(mailboxes?.find(m => String(m.id) === itemId))
|
||||
setPage(0);
|
||||
};
|
||||
|
||||
const handleDeleteClick = (id: string) => {
|
||||
@@ -372,7 +381,8 @@ export function Mail({
|
||||
<RichTreeView
|
||||
//checkboxSelection
|
||||
items={tree}
|
||||
onItemSelectionToggle={handleItemSelectionToggle}
|
||||
expansionTrigger="iconContainer"
|
||||
onItemClick={handleItemClick}
|
||||
slots={{ item: CustomTreeItem }}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user