Sp-dev-fx-webparts: React list form: Getting an 'TypeError: Cannot read property 'indexOf' of undefined' when trying to load some list forms

Created on 28 Oct 2020  路  6Comments  路  Source: pnp/sp-dev-fx-webparts

Authors:
@sharepointknight
@Harshagracy
@DanyWyss

Issue:

I've recently noticed that some of my react list forms are no longer loading and I'm getting the following error 'TypeError: Cannot read property 'indexOf' of undefined' when trying to load some list forms'.
image

This error began to occur after I deployed the most recent update of the SPFX web part. It's really strange because it only seems to be affecting a handful of my forms and I can't quite pin-point what is triggering the error. The majority of my forms are working as expected.

Any help would be much appreciated.

Steps to reproduce the error:

  • Deploy latest React List Form release
  • Open an existing SharePoint Modern page with React List form web part
  • Delete web part and re-add to the page
  • Choose list from options
  • Error message appears in web part (only affects some lists).
working-on-it bug

All 6 comments

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

hi, are you able to provide the definitions for your list which would help us reproduce the issue?

I believe I have fixed this in the other fixes I am working on. I believe it is related to different handling of Lookup fields by SharePoint. I'll make sure this fix gets committed shortly.

Thanks @sharepointknight . I assigned this to you so it doesn't get lost 馃憤

I believe I have fixed this in the other fixes I am working on. I believe it is related to different handling of Lookup fields by SharePoint. I'll make sure this fix gets committed shortly.

Once again, thank you so soo much @sharepointknight your hard work and efforts are very much appreciated!!!

Hi @sharepointknight , is this related to the Lookup columns no longer returning a Choices field in the sharepoint api call? I've had a similar issue in a webpart for my day job and I'd be happy to help with this issue if they're similar.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eldoro80 picture eldoro80  路  4Comments

PathToSharePoint picture PathToSharePoint  路  4Comments

joshburns49 picture joshburns49  路  3Comments

fleagleman picture fleagleman  路  3Comments

Brentless picture Brentless  路  5Comments