1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-10 21:30:06 +02:00

handle blur on topology tooltips

This commit is contained in:
Sérgio Ramos 2017-03-23 15:17:53 +00:00
parent b0a266a020
commit 398071ade2

View File

@ -37,6 +37,7 @@ const Services = (props) => {
const service = services.reduce((acc, service) => const service = services.reduce((acc, service) =>
service.uuid === tooltipData.service ? service : acc service.uuid === tooltipData.service ? service : acc
, {}); , {});
const ttData = { const ttData = {
...tooltipData, ...tooltipData,
data: { data: {
@ -45,9 +46,14 @@ const Services = (props) => {
projectId: project.id projectId: project.id
} }
}; };
toggleTooltip(ttData); toggleTooltip(ttData);
}; };
const handleTooltipBlur = (evt) => onQuickActions(evt, {
service: uiTooltip.service
});
return ( return (
<StyledBackground> <StyledBackground>
<StyledContainer> <StyledContainer>
@ -55,7 +61,7 @@ const Services = (props) => {
onQuickActions={onQuickActions} onQuickActions={onQuickActions}
services={services} services={services}
/> />
<ServicesTooltip {...uiTooltip} /> <ServicesTooltip {...uiTooltip} onBlur={handleTooltipBlur} />
</StyledContainer> </StyledContainer>
</StyledBackground> </StyledBackground>
); );