PMA.UI Documentation by Pathomation

MetadataTree

MetadataTree

Represents a UI component that shows a tree view that allows browsing through the forms and their values submitted from multiple PMA.core servers. This component uses fancytree under the hood.

Constructor

new MetadataTree(context, options)

Source:
Parameters:
Name Type Description
context PMA.UI.Components.Context
options object Configuration options
Properties
Name Type Attributes Default Description
servers Array.<PMA.UI.Components.Tree~server> An array of servers to show files from
element string | HTMLElement The element that hosts the tree view. It can be either a valid CSS selector or an HTMLElement instance.
renderNode function <optional>
Allows tweaking after node state was rendered
rootDirSortCb PMA.UI.Components.Tree~rootDirSortCb <optional>
Function that sorts an array of directories
autoExpandNodes boolean <optional>
false Whether the tree should expand nodes on single click
showAllFields boolean <optional>
false Whether to show all fields or list fields only
Fires:
  • PMA.UI.Components.Events#event:ValueExpanded
  • PMA.UI.Components.Events#event:SlideSelected

Classes

MetadataTree

Methods

addServer(server)

Source:
Adds a new server to the tree
Parameters:
Name Type Description
server PMA.UI.Components.Tree~server A server object

listen(eventName, callback)

Source:
Attaches an event listener
Parameters:
Name Type Description
eventName PMA.UI.Components.Events The name of the event to listen to
callback function The function to call when the event occurs

removeServer(index)

Source:
Removes a server from the tree
Parameters:
Name Type Description
index number The index of the server to remove