I'm going through the sample code: Synchronize FeatureTable highlights and selection
https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-row-highlights
1. There is no method highlight in LayerView
2. There is no method ignoreAbortErrors in promiseUtils
I use Angular/TypeScript and get build errors.
Thanks.
Forrest
Solved! Go to Solution.
You could try casting the LayerView as a FeatureLayerView. That type has the highlight method.
(Edit: I don't know about the promiseUtils issue...maybe someone else can answer that)
You could try casting the LayerView as a FeatureLayerView. That type has the highlight method.
(Edit: I don't know about the promiseUtils issue...maybe someone else can answer that)
I debug into JavaScript
https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-row-highlights
There is promiseUtils.ignoreAbortErrors:
But I get error in TypeScript:
I'm not sure what that method does (I might guess it disables logging abort errors from HTTP requests to the console). But as you've observed, it's not a documented method of promiseUtils.
With that in mind, even though we can see/use the method through the dev console, my own preference would be to ignore that it exists, unless I had some other confirmation (i.e., from Esri documentation) that the method is not going to change or go away in a future version of the SDK.
promiseUtils.ignoreAbortErrors in JavaScript
https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-row-highlights
I need the same code, but it doesn't work in TypeScript.
Thanks.
Forrest
promiseUtils.ignoreAbortErrors in JavaScript
https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-row-highlights
I need the same code, but it doesn't work in TypeScript.
Thanks.
Forrest
If you want to follow that example, you can side-step the issue in typescript by casting (at least temporarily) the promiseUtils object as `any`, and call the `ignoreAbortErrors()` method through that - like so: `(<any>promiseUtils).ignoreAbortErrors();`
That said, the lack of documentation for the method (as far as I can see) and its absence from the typescript interface for the SDK would make me hesitate to rely on the method. If you do the above, I'd be at least cautious when you upgrade to a newer version of the SDK, as an undocumented method like that could behave differently or be removed entirely from the SDK.
That's just my view, anyway...unless someone else from Esri speaks up here and suggests otherwise.
Thank you for your suggestion!
I tried to use promiseUtils.isAbortError, instead of promiseUtils.ignoreAbortErrors. It looks like working.
Forrest