fixed to use getValue method instead of selectedItem