After calling applyEdits from the FeatureLayer object, the edits post successfully. However, in the map view, the edits do not refresh. I have a table like view that pulls the selectedRecords from the current DataSource (with DataSourceComponent). I have to redo my selection for any updates to show in my table.
let layer = ... // FeatureLayerDataSource#layer
const updateFeatures = // some updates...
const result = await layer.applyEdits({ updateFeatures: updateFeatures });
// result procesess successfully
layer.refresh() // this does nothing
Thought layer.refresh() was the ticket out but apparently not. How can I force an update?
Hi tssaus!
You can try below methods to refresh the dataSource:
dataSource.afterAddRecord(addedFeature)
dataSource.afterUpdateRecord(updatedRecord)
dataSource.afterDeleteRecordByIds(recordIds)