I'm attempting to refresh an existing datagrid in the following manner, but that results in rendering errors, like rows still appearing. What is the appropriate way to do this?
void onData( Map<String,Data> data_ ){
if( identical(data,data_) ) return;
data = data_;
if( provider == null ){
provider = new MapDataItemProvider();
grid.setup(dataProvider: dataProvider, columns:columns, gridOptions: gridOptions);
}else{
dataProvider.items.clear();
}
data.forEach( (k,v) => provider.add( toMapped(k,v) );
grid.render();
}
invalidateAllRows()
is another way to notify the grid that the data has changed.