dataTable.reloadRowsOnly() doesn't do anything and dataTable.reload() crashes
ShezCansoft opened this issue · 1 comments
ShezCansoft commented
- Environment: SwiftDataTables - 0.8.1, Xcode - 12.0.1, and iOS - 13
I am trying to show different data based upon the user's selection from a dropdown. Once the user selects the data they want. I run an API call to get the data and update my data array. After doing that, I need to update the table to display the latest retrieved information. So I tried doing dataTable.reloadRowsOnly() and it doesn't do anything. Then I tried doing dataTable.reload() and it crashes atself.sort(column: columnOrder.index, sort: self.headerViewModels[columnOrder.index].sortType)
in file named SwiftDataTables.swift. It throws an index out of bound error on the sortType part as the headerViewModels is empty . Please help me fix this asap as I need to meet a deadline at work. I may be doing it wrong but I couldn't find any documentation about it. Overall please help me update the table after the data is changed. P.S. I am not complaining about the documentation. I really love this project and it has helped me a lot. Thanks for that.
ShezCansoft commented
I was not using datasource (which mentioned in the readme that works best with dynamic data). Sorry for any disturbance caused. Closing it as I figured out my mistake. Thanks