Choose table topic type *before* creating table view
This is a suggestion for a usability improvement.
To a Table View the user must assign exactly one topic type, right?
What about when she can select that type from a menu before creating the Table View?
Just like when e.g. creating a Topicmap the user can choose a Topicmap Type:
You can achieve this in your plugin.js
by defining Table View as an "Extra Menu Item" and make use of an "Options Component". See how e.g. the platform module dmx-topicmaps
deploys the "Topicmap Type" menu:
extraMenuItems: [{
uri: 'dmx.topicmaps.topicmap',
optionsComp: require('./components/dm5-topicmap-options').default,
create: (name, data) => {
store.dispatch('createTopicmap', {
name,
topicmapTypeUri: data.topicmapTypeUri,
isPrivate: false // TODO
})
}
}]
The Options Component (red oval) can be an arbitrary Vue component, with any number of form fields. Its local state (data()
) is passed as 2nd argument (here: "data") to the create()
function.
An extra menu item has full control about the creation process by the means of the create()
function.
Extra Menu Items are those appearing in the create menu below the regular topic types in group "DMX":
You must remove the dmx.webclient.add_to_create_menu
view config setting from "Table View" then.
Tell me if you need more infos.