Skip to content

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?

@martinlingstuyl
Copy link
Contributor

martinlingstuyl commented Nov 6, 2024

Hi @michaelmaillot,
It seems @gruizdev is unresponsive on this. Would it be an idea if someone else picked this up to get it unblocked?

Interesting feature that I'm currently building a workaround for because it's not yet in. Also I've seen another relevant PR (#1781) is waiting on this one.

@michaelmaillot
Copy link
Collaborator

Hello @martinlingstuyl, you can take it away 🙂

I'll let you share your progress here, feel free to open another PR if necessary. I'll assign the issue to you.

@michaelmaillot
Copy link
Collaborator

Closing this PR due to lack of owner's response.

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.

5 participants