Skip to content
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

Added orderBy to DynamicField props for lookup fields #1747

Merged
merged 1 commit into from
Feb 11, 2024

Conversation

GuidoZam
Copy link
Contributor

Q A
Bug fix? [ ]
New feature? [x]
New sample? [ ]

What's in this Pull Request?

Added orderBy property on the DynamicField control to allow sorting when using directly the DynamicField control.

For example if you have a DynamicForm and you want to declare a custom sorting for lookup TargetField you can do the following:

private _customRenderTargetField = (fieldProperties: IDynamicFieldProps): React.ReactElement<IDynamicFieldProps> => {
  return <DynamicField
      key="TargetField"
      {...fieldProperties}
      orderBy={"Title desc"}
      />;
}

@AJIXuMuK AJIXuMuK merged commit f9380ec into pnp:dev Feb 11, 2024
1 check passed
@AJIXuMuK
Copy link
Collaborator

Thanks @GuidoZam!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants