) => {
if (
!focused &&
(e.target as HTMLDivElement).closest('.ory-cell-inner') ===
findDOMNode(this.ref)
) {
focusCell({ source: 'onMouseDown' });
}
return true;
},
};
}
return (
{rows.map((r: string) => (
))}
);
}
}
const mapStateToProps = createStructuredSelector({ isEditMode, isPreviewMode });
const mapDispatchToProps = (
dispatch: Dispatch,
{ id }: ComponetizedCell
) =>
bindActionCreators(
{
updateCellLayout: updateCellLayout(id),
},
// tslint:disable-next-line:no-any
dispatch as any
);
export default connect(
mapStateToProps,
mapDispatchToProps
)(Layout);