mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-10-13 23:38:45 +01:00
make cellId optional
This commit is contained in:
parent
1e0a0b73e0
commit
1e32838f60
@ -54,11 +54,11 @@ export const SET_HOVERED_CELL = "SET_HOVERED_CELL";
|
||||
export interface SetHoveredCellAction {
|
||||
type: "SET_HOVERED_CELL";
|
||||
payload: {
|
||||
cellId: CellId;
|
||||
cellId?: CellId;
|
||||
};
|
||||
}
|
||||
|
||||
export const setHoveredCell = (payload: { cellId: CellId }): SetHoveredCellAction => {
|
||||
export const setHoveredCell = (payload: { cellId?: CellId }): SetHoveredCellAction => {
|
||||
return {
|
||||
type: SET_HOVERED_CELL,
|
||||
payload,
|
||||
|
@ -30,7 +30,7 @@ class HoverableCell extends React.Component<ComponentProps & DispatchProps> {
|
||||
|
||||
const mapDispatchToProps = (dispatch: Dispatch, { id }: { id: string }): DispatchProps => ({
|
||||
hover: () => dispatch(actions.setHoveredCell({ cellId: id })),
|
||||
unHover: () => dispatch(actions.setHoveredCell({ cellId: "" })),
|
||||
unHover: () => dispatch(actions.setHoveredCell({ cellId: undefined })),
|
||||
});
|
||||
|
||||
export default connect(undefined, mapDispatchToProps)(HoverableCell);
|
||||
|
Loading…
x
Reference in New Issue
Block a user