Select to view content in your preferred language

arcgis-feature-table .layers Property

78
3
Jump to solution
Tuesday
D_Atkins
Occasional Contributor

Continuing working with the new components, and now onto the Feature-Table -- a mission-critical widget.  

I'm having trouble with the .layers property, in both explicitly setting the array, but more specifically, I can't read any values from the property either.  I have no problem with the feature-table.layer property, so have eliminated most variable references concerns.

We could workaround the issue with .layers, spin up our own 'layer selector' input box and such, but it seems more straightforward to solve our issue with the .layers property if possible.

Ready-made Codepen: FeatureTable .layers Sample

0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Esri Frequent Contributor

The `layers` property of the FeatureTable is meant as a settable property by the user.

We can update this documentation to make it more clear of the purpose. It does not auto-populate with layers from the provided map that show in the dropdown. You set it to override what layers that appear in the dropdown.

Here is a demo showing setting and reading `layers` when the table is used by itself.

View solution in original post

0 Kudos
3 Replies
ReneRubalcava
Esri Frequent Contributor

The `layers` property of the FeatureTable is meant as a settable property by the user.

We can update this documentation to make it more clear of the purpose. It does not auto-populate with layers from the provided map that show in the dropdown. You set it to override what layers that appear in the dropdown.

Here is a demo showing setting and reading `layers` when the table is used by itself.

0 Kudos
D_Atkins
Occasional Contributor

Probably not as pretty as ESRI's professional demos, but we're happy with the implementation!

Codepen MWE: Feature-Table.layers Property

0 Kudos
D_Atkins
Occasional Contributor

Thanks for the clarification; I'll be sure to give that a try!