This widget is meant to be used with the Fliplet platform.
Run for local development with the fliplet-cli
:
$ npm install
$ npm run watch
Then, keep the watcher running and on a new tab run the following command:
$ fliplet run
This hook is triggered when the data is retrieved from the data source.
Attributes returned in the options
object:
container
: the container elemententry
: the data source entryvm
: the Vue instance of the widget
Fliplet.Hooks.on('repeaterDataRetrieved', function(options) {
// options contains "container", "entry" and "vm"
});
This hook is triggered before the entry is retrieved from the data source. It can be used to modify the data source query.
Attributes returned in the options
object:
container
: the container elementconnection
: the data source connectionvm
: the Vue instance of the widgetdataSourceId
: the data source id used for the connectiondataSourceEntryId
: the data source entry id to be loaded
Fliplet.Hooks.on('recordContainerBeforeRetrieveData', function () {
// Modify the data source query used by "findOne" to retrieve the data
return { where: { name: 'John' } };
});