FeatureTable Bulk Edit Implementation Issue

140
2
Jump to solution
07-25-2022 01:27 AM
WongChunKang
New Contributor II

I am trying to implement bulk edit feature on FeatureTable using @arcgis/core-4.24.7, i.e. editing on one field will apply the same edit on other selected rows.. However, I am facing some inconsistent updates after a few edits later. You can view such inconsistency around 00:29 mark from the following video, where heights was updated from 10 to 5, decks should stay at 8 but instead get reverted back to 9.

WongChunKang_0-1658738007172.png

The code can be downloaded from the GitHub repo here: https://github.com/chunkangwong/arcgis-featureTable-bulk-edit, along with installation instruction. You may follow the steps as shown in the video.

0 Kudos
1 Solution

Accepted Solutions
WongChunKang
New Contributor II

I replaced the logic of extracting the selection-change event to keep track of the selected rows with the hidden, undocumented FeatureTable.grid.selectedItems._items property of FeatureTable. This solved the bug, even though it is not recommended. For anyone interested, you may refer to my GitHub repo here

View solution in original post

0 Kudos
2 Replies
WongChunKang
New Contributor II

I replaced the logic of extracting the selection-change event to keep track of the selected rows with the hidden, undocumented FeatureTable.grid.selectedItems._items property of FeatureTable. This solved the bug, even though it is not recommended. For anyone interested, you may refer to my GitHub repo here

0 Kudos
WongChunKang
New Contributor II

I found out another hidden event emitted from the individual column of FeatureTable that is "value-change". This event is emitted whenever an edit is registered on the map. Combining this knowledge, the code becomes more streamlined. For anyone interested, you may refer to my GitHub repo here

0 Kudos