Files
Manage files for use with components of flows.

Configuration
Set up a new instance with config parameters and set/get methods:
const files = appmixer.ui.Files(config)
files.set(key, value)
files.get(key)config.el ...
config.el ...Instance
State
files.state(name, value)loader
loaderType: Boolean | Default: null
Toggle a custom loading state.
error
errorType: String | Default: null
Toggle a custom error message.
query
Type: Object | Default: DefaultQuery
Defines custom query parameters for retrieving files. Example:
// Set a custom query.
files.state('query', {
pattern: 'my custom pattern',
sort: { uploadDate: -1 }
});
// Listen for query changes triggered by user interaction.
files.on('change:query', query => {
console.log('Current query:', query);
});Events
files.on(event, handler)flow:open
flow:openfiles.on('flow:open', flowId => {/* ... */})Triggered when the user selects a flow associated with a file listed in the widget.
Example
const files = appmixer.ui.Files({
el: '#files'
})
files.open()Last updated
Was this helpful?
