metadata index not honored

2 posts, 0 answers
  1. Robert
    Robert avatar
    8 posts
    Member since:
    Jun 2017

    Posted 18 Jun Link to this post

    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.

  2. nikolay.tsonev
    Admin
    nikolay.tsonev avatar
    287 posts

    Posted 19 Jun Link to this post

    Hi Robert,

    This is a valid issue for the current version of nativescript-telerik-ui-pro 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.
Back to Top