Skip to content

Commit

Permalink
Tree menu on elect fix (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonidoo authored May 24, 2024
1 parent 743c9b8 commit 915c063
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app-typescript/components/TreeMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function nodeCanBeSelected<T>(item: IParent<T> | IChildren<T>): item is IChildre

function onSelect<T>(item: ITreeMenuNode<T>) {
if (nodeCanBeSelected(item)) {
return item.onSelect;
return item.onSelect();
}

return undefined;
Expand Down Expand Up @@ -420,7 +420,9 @@ export class TreeMenu<T> extends React.Component<IProps<T>, IState<T>> {
key={i}
option={option}
handleTree={this.handleTree}
onClick={onSelect(option)}
onClick={() => {
onSelect(option);
}}
disabledItem={disabledItem(option)}
getBorderColor={this.props.getBorderColor}
getBackgroundColor={this.props.getBackgroundColor}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "superdesk-ui-framework",
"version": "3.1.9",
"version": "3.1.10",
"license": "AGPL-3.0",
"repository": {
"type": "git",
Expand Down

0 comments on commit 915c063

Please sign in to comment.