Capturing folder created event inside pnp folder exlorer control

%3CLINGO-SUB%20id%3D%22lingo-sub-2359717%22%20slang%3D%22en-US%22%3ECapturing%20folder%20created%20event%20inside%20pnp%20folder%20exlorer%20control%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2359717%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20workaround%20to%20call%20a%20function%20when%20a%20new%20folder%20is%20created%20using%20folder%20explorer%20control%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fsp-dev-fx-controls-react%2Fcontrols%2FFolderExplorer%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EFolderExplorer%20-%20%40pnp%2Fspfx-controls-react%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20could%20not%20find%20anything%20in%20the%20document.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2360266%22%20slang%3D%22en-US%22%3ERe%3A%20Capturing%20folder%20created%20event%20inside%20pnp%20folder%20exlorer%20control%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2360266%22%20slang%3D%22en-US%22%3EHi%20DarthWader%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20control%20does%20not%20support%20that%20currently%2C%20but%20it%20should%20be%20a%20relatively%20simple%20update%20to%20the%20control%3A%3CBR%20%2F%3E-%20add%20a%20new%20optional%20property%20that%20is%20a%20callback%20function%3CBR%20%2F%3E-%20call%20that%20function%20after%20adding%20the%20folder%20if%20the%20property%20was%20defined%3CBR%20%2F%3E%3CBR%20%2F%3EI%20suggest%20you%20log%20a%20new%20issue%20as%20an%20improvement%20within%20the%20GitHub%20repository%20for%20tracking.%20You%20could%20then%20implement%20it%20and%20send%20a%20pull%20request%2C%20or%20wait%20for%20someone%20to%20implement%20it.%3C%2FLINGO-BODY%3E
New Contributor

Hi All,

 

Is there any workaround to call a function when a new folder is created using folder explorer control?

 

FolderExplorer - @pnp/spfx-controls-react

 

I could not find anything in the document.

 

Thanks in advance

2 Replies
Hi DarthWader

The control does not support that currently, but it should be a relatively simple update to the control:
- add a new optional property that is a callback function
- call that function after adding the folder if the property was defined

I suggest you log a new issue as an improvement within the GitHub repository for tracking. You could then implement it and send a pull request, or wait for someone to implement it.
Hi Joel,

I will do it. if I need some help, I will bug you in the same thread :D . Thanks for your time. Cheers.