Allow to use item.onClick in PickerMenu

master
Vitaliy Filippov 2020-04-27 21:53:59 +03:00
parent d436eaed80
commit 8dd3bb5b93
1 changed files with 8 additions and 1 deletions

View File

@ -70,7 +70,14 @@ export default class PickerMenu extends Picker
}
const sel = this.props.items[this.state.active];
const f = this.props.onSelectItem;
f && f(sel);
if (f)
{
f(sel);
}
else if (sel.onClick)
{
sel.onClick();
}
}
onMouseOver = (ev) =>