sp-dev-fx-controls-react
sp-dev-fx-controls-react copied to clipboard
ISSUE 1683 Fix: (DynamicForm) Added the option to edit file name
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)
@gruizdev - sorry for the long delay. Could you please resolve the conflict?
Thanks!
@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.
Hi @gruizdev,
Are you still working on this one? Do you need any assistance?