-
Notifications
You must be signed in to change notification settings - Fork 380
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
ListItemAttachments use when creating a new list item #363
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
This would be very useful. I've struggled to get this working (still haven't) but yes it would be great to be able to test it without submitting? |
Hi, are there any plans to add this functionality? |
@mgwojciech sounds like a way to get it to work, thanks for the suggestion. Would you be willing to submit a PR and also include an update to documentation? If so I will assign you to this issue so other people are aware that it's being addressed. |
@joelfmrodrigues - sure thing! I'm not sure if quality of the docs will be satisfactory but I'll do my best :) |
Pushed with my other PR: Have a great weekend |
@mgwojciech Thanks, I'm sure it will be satisfactory :) All I was referring to was to add an example for the use case above so people understand how to use it when the item is yet to be created. |
PR merged long ago, closing |
Category
[ ] Enhancement
[ ] Bug
[X ] Question
Version
Please specify what version of the library you are using: [ 1.14.0 ]
Expected / Desired Behavior / Question
I am just learning the whole SPFx and am trying to enable a user to add attachments on my form which will create a new list item after they filled out the form and click the submit button. I just added the ListItemAttachments component and it is expecting the list item ID which doesn't exist yet. Is there any way to use this component before the list item is created and during/after creation add the attachments to the newly create list item?
Observed Behavior
I am using a state variable to save the new list item ID after creation which is 0 until the user clicks on the submit button.
When I load the webpart, I get an error "Error on load list item attachment, reason: Cannot read property 'map' of null"
Steps to Reproduce
Added below code to my tsx (listId redacted)
The text was updated successfully, but these errors were encountered: