directus-extension-refresh-on-changed
This Directus custom interface allows current item to be refreshed whenever the item is changed elsewhere.
Install
Install directly from Marketplace or alternatively do:
$ npm run build
$ cp package.json dist directus/extensions/directus-extension-refresh-on-changed
Enable the extension
After installing the extension you can add it to any collection inside your Directus project. Note that by default the extension is not added anywhere automatically. It’s up to you to decide which collections should be watched.
How to watch a collection
- Create a new field
- Look for the new “Refresh item on item update” interface (search or scroll down)
- Choose a name for your field, e.g. “refresh” or “alert_if_changed”
- Optionally, enable the warning
- Choose which fields to watch inside the target collection
Options
- Show warning: When enabled, it will display a warning to clients currently viewing the item, whenever the item is changed.
Interface inside the target collection
- The new field you created will be visible inside the target collection like this:
Example warning
- If “Show warning” option is enabled, this is how you will be notified if another user edited (and saved) the same item you are currently viewing:
Keywords: directus, interface, extension, websocket, realtime, refresh, change, update