Fixing an issue with predefined seletedRowIndex