This is a migrated thread and some comments may be shown as answers.

metadata index not honored

1 Answer 50 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert
Top achievements
Rank 1
Robert asked on 18 Jun 2017, 03:45 PM

It looks like the 'index' field in metadata.propertyAnnotations is not honored, at least using Angular on iOS (haven't tried on Android).

This is my .html:

<RadDataForm [source]="form" [metadata]="metadata"></RadDataForm>

 

And this is my metadata:

this.metadata = {
  isReadOnly: false,
  commitMode: "immediate",
  validationMode: "immediate",
  propertyAnnotations: [
    {
      name: "email",
      index: 0,
      editor: "Email",
    },
    {
      name: "name",
      index: 1,
      editor: "Text",
    },
    {
      name: "age",
      index: 2,
      editor: "Number",
    },
    {
      name: "city",
      index: 3,
      editor: "Picker",
      valuesProvider: ["New York", "Boston", "Atlanta"]
    },
    {
      name: "street",
      index: 4,
      editor: "Text",
    },
    {
      name: "streetNumber",
      index: 5,
      editor: "Number",
    },
  ]
};

The form displays in the same (incorrect) order whether or not I include the 'index' field.

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsonev
Telerik team
answered on 19 Jun 2017, 08:46 AM
Hi Robert,

This is a valid issue for the current version of --- and the index property in the metadata will not be respected. This will cause to not set up the right position for the fields.
The problem is logged here and it is fixed for the upcoming release, you could test it on your side while using our @next tag.
To do this you could follow the below-attached instructions:
1.
tns plugin remove nativescript-telerik-ui-pro
2. 
tns plugin addnativescript-telerik-ui-pro@next
3. remove platforms and node_modules folders and rebuild the app

Hope this helps.
Regards,
nikolay.tsonev
Progress Telerik
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Tags
DataForm
Asked by
Robert
Top achievements
Rank 1
Answers by
Nikolay Tsonev
Telerik team
Share this question
or