robbieaverill

If forking the module is the solution- that’s not optimal

unclecheese

Didn’t have time to read the whole thing in detail, but this looks like another case where not enough stuff is registered with injector? If the answer is loading a source file by path name, chances are that component should be injected.

Mo

Basically, it seems that some of the React libs inside asset-admin are not able to be called outside the module.

Mo

I was trying to make a custom modal, similar to InsertMediaModal, but that requires importing containers\AssetAdmin\AssetAdmin into your react component

Mo

but containers\AssetAdmin\AssetAdmin either fails to load or requires quite a few other libs that are not exposed either 😞

Mo

It's a shame silversrtipe/asset-admin doesn't seem to expose InsertMediaModal in a way that I can use it outside of the asset-admin module 😞

Mo

Apparently if you don't provide handlers for inserting files to InsertMediaModal then it falls back to previewing a folder (which is exactly what I want)

Mo

OK, so creating the component inside silverstripe/asset-admin is working great

Mo

not really ideal, but it at least seems to work

Mo

I have just caved and forked the asset admin module 😱