sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Failed to load lookup field source list in modern list view edit column pane when the lookup field "LookupList" property is lowercase

Open yungfu opened this issue 2 years ago • 1 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

No response

What browser(s) / client(s) have you tested

  • [ ] 💥 Internet Explorer
  • [X] 💥 Microsoft Edge
  • [X] 💥 Google Chrome
  • [X] 💥 FireFox
  • [ ] 💥 Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

No response

Describe the bug / error

Create a lookup field by pnpjs sp.web.lists.getById().addLookup, the lookup field is added successfully, and it can be edit in classic experience field setting page. But when you try to edit field from modern list view header Column Setting -> Edit command item, the *Select a list as source in opened right pane is always the first one, not the correct value. If you try to add a lookup field with schema xml, when the LookupList attribute is lowercase, this issue disappeared, but if the property is uppercase, this issue can be reproduced. I think this is caused by the uppercase LookupList property.

Steps to reproduce

  1. Create a lookup field by schema with uppercase LookupList property
  2. Edit created field in classic experience field edit page, the source list is correct
  3. Edit created field in modern list view page right pane, by click Field Setting -> Edit command in list view header, the source list property is incorrect
  4. Create a lookup field by schema xml with lowercase LookupList property, this issue disappeared.

Expected behavior

Created lookup field can display the correct source list in modern list view page column edit pane no matter the LookupList property is lowercase or uppercase.

yungfu avatar Apr 20 '22 05:04 yungfu

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Apr 20 '22 05:04 ghost