New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting the data in PropertyFieldCollectionData collectionData #123

Closed
jesseve opened this Issue Dec 4, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@jesseve
Copy link

jesseve commented Dec 4, 2018

[X] Question

Version

Please specify what version of the library you are using: [1.12.0]

I am using the PropertyFieldCollectionData control and have a list of items set up for the collectionData. When I display the collection data the order is random and not same as shown in the control popup. I tried adding a number field but it allows for duplicate values and I couldn't attach any event listeners to the field.

I'm looking for something similiar as the custom sort order in SharePoint term store.

My question is that is it possible to have/create a sorting field for the PropertyFieldCollectionData control and if yes, how could it be done?

@estruyf estruyf added the enhancement label Dec 6, 2018

@estruyf

This comment has been minimized.

Copy link
Collaborator

estruyf commented Dec 6, 2018

@jesseve that would be a great enhancement for the control!

@estruyf estruyf added this to the 1.13.0 milestone Dec 6, 2018

estruyf added a commit that referenced this issue Dec 6, 2018

@estruyf

This comment has been minimized.

Copy link
Collaborator

estruyf commented Dec 6, 2018

@jesseve this has now be implemented and will be available with the v1.13.0 release. Feel free to test out the latest beta to see if it fit your needs. More information about installing a beta version can be found here: https://sharepoint.github.io/sp-dev-fx-property-controls/beta/

To give you more information, every item will get a sortIdx field. So you can add your own sorting actions based on if you want to sort your items asc. or desc.

To enable sorting for the collection data control, you will have to set enableSorting: true on the control.

@jesseve

This comment has been minimized.

Copy link

jesseve commented Dec 10, 2018

Wow, that was fast. I will test this out, thank you!

@jesseve jesseve closed this Dec 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment