prisma / prisma-admin-feedback

Feedback for Prisma Admin (currently in invite-only preview)
6 stars 1 forks source link

Iframe views: Support data updates without page reloads (using window.postMessage) #35

Open schickling opened 5 years ago

schickling commented 5 years ago

The current default behavior for custom views (using iFrames) is to reload the iframe when the injected data changes (provided through a query argument string). However, when using SPAs/PWAs it might be desirable to not reload the iframe when the data changes (e.g. when selecting a different data row in the results table).

This could for example be accomplished by using window.postMessage. This would probably require us to introduce some kind of "data injection method" concept which needs to be configured when a user is setting up a custom view by choosing between e.g. query string or postMessage.

Would love to hear more thoughts on alternatives on how to inject "updateable" data.