Skip to content

Impossible to edit list item using <DynamicForm> #2080

@jeanfgagnon

Description

@jeanfgagnon

Impossible to edit list item using . When a valid listItemId is provided, I have errors.

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

Please specify what version of the library you are using: [ @pnp/spfx-controls-react": "^3.23.0 ]

Expected / Desired Behavior / Question

Load an item and edit it into

Observed Behavior

When the listItemId props is used, it tries to load the list by id using the _api relative to SitePages in place of using the subsite. 404
It goes to:
https://tenant.sharepoint.com/sites/section/subsite/SitePages/_api/web/lists('548fa362-373c-4e9f-ac05-e2acc942efca')/items(1)
but should go to:
https://tenant.sharepoint.com/sites/section/subsite/_api/web/lists('548fa362-373c-4e9f-ac05-e2acc942efca')/items(1)
I was not able to create a page directly in https://tenant.sharepoint.com/sites/section/subsite
webAbsoluteUrl seems to not be used at all when listItemId is provided.

Steps to Reproduce

WebParts using in a modern page located in a SitePages folder

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions