How to make the field order in fields keeps pace with json data in flat view

I found the field order in fields is different from  field order in json data.Is there any way to keep them consistent ? thank you.

Attachments:
q1.png

3 answers

Public
Dmytro Zvazhii Flexmonster December 5, 2017

Hello Shenyi,
Thank you for your question.
For now, the field list in flat view works the following way: the selected fields are located on the top and the non-selected fields are located below, sorted in alphabetical order. Please note that the fields list reflects the order of the fields on the grid. Therefore, when you decide to reorder the fields on the grid using the drag-n-drop feature the same order will be applied to the fields list. At the same time when you reorder the fields in the fields list using drag-n-drop and then press “Apply” button the order will be applied to the grid. The only way to achieve the same fields order as in the data source is not applying any slice. In such case, all the fields will be selected and ordered according to the data source fields order. Here is the example – http://jsfiddle.net/flexmonster/17y8edL8/.
Please let us know if you have any additional questions here.
Regards,
Dmytro.

Public
shenyi.su December 28, 2017

Hi Dmytro,
I found that when the key is a number in json data, it will appear at the top of the field list,how can I make it un-sorted?
Thanks

Attachments:
p_2.1.png
p_2.2.png

Public
Dmytro Zvazhii Flexmonster December 28, 2017

Hello Shenyi,
Thank you for your question. 
For now, the component does not allow to apply the sorting order for the fields list. However, the behavior you are describing is not correct. If the slice is not set for the flat view and “showDefaultSlice” property is false the fields order should be the same as in data source. We are going to add the necessary fix in the future releases.
Regards,
Dmytro.

Please login or Register to Submit Answer