Frontend Page - Configure MenuConfig: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
Line 31: Line 31:
* visibleRenameRowIndex : identify row being renamed
* visibleRenameRowIndex : identify row being renamed
* show : expand or collapse elements
* show : expand or collapse elements
== OnDrag ==
Under Construction
<syntaxhighlight lang="json">
<div
dragable
onDragStart={(e) => {}
onDragEnter={(e) => {}
onDragEnd={}
>
{"text"}
</div>
</syntaxhighlight>
* onDragStart : when you started to click element
* onDragEnter : when you passed element
* onDragEnd : when you released holding


== menuElements recursion ==  
== menuElements recursion ==  

Revision as of 10:02, 16 June 2023

Overview

Frontend page for creating and editing MenuConfigs

Repository

visibleObj Object

let visibleObj = {
	visibleRowIndex: 0, // row index we have open on page
	visibleRenameRowIndex: 0, // row index currently renaming
	rows:[
		{
			menuElements: [
				{
					show: false, // whether the menuElement settings are expanded
					menuText
					menuElements: [ // if menuElement is elementType menu, will have child menuElements
					
					],
				},
				// ..
			]
		},
		// ..
	]
}
  • visibleRowIndex : identify visible position row
  • visibleRenameRowIndex : identify row being renamed
  • show : expand or collapse elements

OnDrag

Under Construction

	<div
		dragable
		onDragStart={(e) => {}
		onDragEnter={(e) => {}
		onDragEnd={}
	>
	{"text"}
	</div>
  • onDragStart : when you started to click element
  • onDragEnter : when you passed element
  • onDragEnd : when you released holding


menuElements recursion

  • Menu elements are nested to any level
  • Structure of rows and menuElements in visible object matches structure of menuConfig/menuConfigSetting

Working documents