Intercepting Query String Changes in Web Parts -Error when traversing between items in Left nav

%3CLINGO-SUB%20id%3D%22lingo-sub-2036252%22%20slang%3D%22en-US%22%3EIntercepting%20Query%20String%20Changes%20in%20Web%20Parts%20-Error%20when%20traversing%20between%20items%20in%20Left%20nav%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2036252%22%20slang%3D%22en-US%22%3E%3CP%3EDear%20All%2C%3C%2FP%3E%3CP%3EI%20am%20working%20in%20Sharepoint%20online%202019.%20We%20had%20a%20requirement%20to%20change%20query%20string%20(added%20filter)%3C%2FP%3E%3CP%3Ein%20application%20spfx%20webpart%20with%20kendo%20grid.%20It%20got%20changed%20in%20URL%20but%20the%20grid%20not%20reloaded.%20So%20we%20used%20Intercepting%20query%20logic%20by%20referring%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fguidance%2Fintercepting-query-changes-in-webparts%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fweb-parts%2Fguidance%2Fintercepting-query-changes-in-webparts.%3C%2FA%3E%3C%2FP%3E%3CP%3EEverything%20works%20fine%20inside%20the%20webpart.%20Query%20changed%20in%20URL%20reflected%20in%20grid%20and%20data%20loaded%20based%20on%20query%20string.%3C%2FP%3E%3CP%3ENow%20the%20issue%20is%20when%20we%20traverse%20between%20items%20in%20left%20navigation%20(between%20the%20applications)%3C%2FP%3E%3CP%3E%3CSTRONG%3E%22Cannot%20read%20property%20'web'%20of%20undefined%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%22Cannot%20read%20property%20'wrapper'%20of%20undefined%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Eerror%20is%20coming.(kindly%20see%20attachment).%3C%2FP%3E%3CP%3EBefore%20implementing%20Query%20intercepting%20it%20was%20working%20fine.%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2Fimages%2Femoticons%2Fsad_40x40_1.gif%22%20alt%3D%22%3Asad%3A%22%20title%3D%22%3Asad%3A%22%20%2F%3E%3C%2FP%3E%3CP%3ECouldn't%20find%20the%20solution%20to%20fix%20this%20issue.%20Please%20help!!!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EAnnamsoft%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2036252%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Lists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Contributor

Dear All,

I am working in Sharepoint online 2019. We had a requirement to change query string (added filter)

in application spfx webpart with kendo grid. It got changed in URL but the grid not reloaded. So we used Intercepting query logic by referring https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/intercepting-query-changes-i...

Everything works fine inside the webpart. Query changed in URL reflected in grid and data loaded based on query string.

Now the issue is when we traverse between items in left navigation (between the applications)

"Cannot read property 'web' of undefined"

"Cannot read property 'wrapper' of undefined"

error is coming.(kindly see attachment).

Before implementing Query intercepting it was working fine.:sad:

Couldn't find the solution to fix this issue. Please help!!!

 

Thanks

Annamsoft

0 Replies