mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Return focus to item after setting its labels
This commit is contained in:
parent
c99466c21e
commit
5187ad5113
1 changed files with 9 additions and 1 deletions
|
|
@ -430,6 +430,9 @@ export function HomeFeedContainer(props: HomeFeedContainerProps): JSX.Element {
|
|||
setLabelsTarget={setLabelsTarget}
|
||||
showAddLinkModal={showAddLinkModal}
|
||||
setShowAddLinkModal={setShowAddLinkModal}
|
||||
setActiveItem={(item: LibraryItem) => {
|
||||
activateCard(item.node.id)
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
@ -452,6 +455,7 @@ type HomeFeedContentProps = {
|
|||
setLabelsTarget: (target: LibraryItem | undefined) => void
|
||||
showAddLinkModal: boolean
|
||||
setShowAddLinkModal: (show: boolean) => void
|
||||
setActiveItem: (item: LibraryItem) => void
|
||||
actionHandler: (
|
||||
action: LinkedItemCardAction,
|
||||
item: LibraryItem | undefined
|
||||
|
|
@ -745,7 +749,11 @@ function HomeFeedGrid(props: HomeFeedContentProps): JSX.Element {
|
|||
}
|
||||
}}
|
||||
onOpenChange={() => {
|
||||
props.setLabelsTarget(undefined)
|
||||
if (props.labelsTarget) {
|
||||
const activate = props.labelsTarget
|
||||
props.setActiveItem(activate)
|
||||
props.setLabelsTarget(undefined)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue