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

ISSUE 1683 Fix: (DynamicForm) Added the option to edit file name #1726

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

gruizdev
Copy link

Added the option to edit file name when the form points to a document library and an item is being edited

Q A
Bug fix? [ X ]
New feature? [ ]
New sample? [ ]
Related issues? fixes #1683

What's in this Pull Request?

When the control DynamicForm is configured to display an item in a document library, the field Name (FileLeafRef) does not come through to edit.

To amend that behaviour, I have performed the following changes:

DynamicForm.tsx

  • The function that retrieves the fields (getFormFields) has been modified to bring the field FileLeafRef when an item id has been provided (hence editing an item)
  • The function that provides the information needed to display the fields (getFieldInformations) has been modified to include a case for File fields and retrieve the file name

DynamicField.tsx

  • A new case has been added to display a File field by displaying a text box with the file name

SPService.ts

  • A new function has been added to SPService to retrieve the file name of a document library item (getFileName)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the first contribution to this project.

@AJIXuMuK
Copy link
Collaborator

@gruizdev - sorry for the long delay.
Could you please resolve the conflict?

Thanks!

@joelfmrodrigues
Copy link
Collaborator

@gruizdev would you be able to resolve the conflicts or need some help with this? There are more PRs that target this control and ideally we would merge them in order of submission.

@michaelmaillot
Copy link
Collaborator

Hi @gruizdev,

Are you still working on this one? Do you need any assistance?

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.

4 participants