How can sort the fields in "Fields" and hide some fields in json data?

Answered
shuwei asked on November 9, 2021

Hello,
I used control in my vue project.
How can I  sort the fields in "Fields"?
How can I hide the fields not in mapping but in json data source?
thank.

2 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster November 12, 2021

Hello, Shuwei,
 
Thank you for reaching out to us.
 

  1. Sorting options are not supported in the Field List inside the component. The fields are displayed in alphabetical order. However, we can suggest you a workaround illustrated in the following JSFiddle: https://jsfiddle.net/flexmonster/x72yo3vm/
  2. It is only possible to hide the fields using the mapping. Kindly note that the mapping can be defined using a URL to a JSON file with the mapping as well:
report: {
    dataSource: {
        filename: "data.json",
        mapping: "<URL_to_your_mapping_file>"
    }
}

 
We hope it helps. You are welcome to write to us in case further questions arise.
 
Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster January 26, 2022

Hello, Shuwei,
 
Hope you are doing well.
 
Our team is happy to announce that we have added a new API call sortFieldsList() for sorting Field List items.
This feature is included in the 2.9.17 version of Flexmonster: https://www.flexmonster.com/release-notes/version-2917/. Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
You can find more information on using the new API call in our documentation: https://www.flexmonster.com/api/sortfieldslist/.
 
You are welcome to write to us in case further questions arise.
 
Kind regards,
Nadia

Please login or Register to Submit Answer