flamelink / flamelink-js-sdk

🦊 Official Flamelink JavaScript SDK for both the Firebase Realtime database and Cloud Firestore
https://flamelink.github.io/flamelink-js-sdk
MIT License
43 stars 5 forks source link

Order field not automatically created #71

Closed charbelalkazzi closed 5 years ago

charbelalkazzi commented 5 years ago

After adding the entries to the CMS, the items created do not have an 'order' field created unless their order is manually changed. So currently, to be able to list the ordered entries on the website using: orderBy: 'order', I'm having to edit the order of the entries every time I add one.

Please check it,

Thanks

C.

jperasmus commented 5 years ago

Thanks for logging this issue, @charbelalkazzi

We'll look into it.

jordanch commented 5 years ago

Hi @charbelalkazzi,

What is your expected behaviour for content creation with regards to the order property? E.g. Do you expect every entry created to be created with an order property where the value is the number of entries belong to the schema minus one (since the order property value starts from 0)?

Do you expect the parentId property to also be set with an initial value of 0?

jordanch commented 5 years ago

The following implementation has been released:

New content entries get order and parentId properties set to 0. When a collection/form is "sorted" using the Structure Collection feature, each entry's order and parentId field will be updated appropriately.

jordanch commented 5 years ago

@jperasmus happy to close?

jperasmus commented 5 years ago

Thanks, Jordan.