You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The EXPLORER_TRANSFORMS setting enables the developer to provide a custom template for the values in the given column, for example, to display images if the URL is retrieved from the DB:
Returning None would instruct the system to continue on a normal path: check the EXPLORER_TRANSFORMS setting and if the column is not present there fall back to displaying the value as usual.
This would mean that the following default implementation would provide 100% backward compatible behavior.
@lawson89 Thanks for flagging this - after assigning it I've managed to completely lose track of it! @eeriksp sorry about that! 😬
This does indeed sound like a great idea. But this is another feature I don't actually use myself - so there's a little learning involved for me as well here.
@eeriksp Did you make some progress on an implementation for this?
I'd very much like to have this capability, and would be happy to help with testing, or try to pick up from where you left off, if you've found yourself pulled away on other projects.
The
EXPLORER_TRANSFORMS
setting enables the developer to provide a custom template for the values in the given column, for example, to display images if the URL is retrieved from the DB:However, this system is not very flexible.
It would be nice to:
_img
)mailto
link, if it is formated as an email)For enabling such flexibility, I would propose to add the
EXPLORER_DISPLAY_CALLBACK
setting which accepts a function with the following signature:This would be flexible enough to satisfy all of the aforementioned use-cases:
Returning
None
would instruct the system to continue on a normal path: check theEXPLORER_TRANSFORMS
setting and if the column is not present there fall back to displaying the value as usual.This would mean that the following default implementation would provide 100% backward compatible behavior.
I would be interested in implementing that feature and preparing a PR.
What are your thoughts regarding that new API proposal?
The text was updated successfully, but these errors were encountered: