File tree Expand file tree Collapse file tree 7 files changed +20
-18
lines changed
apps/web-widgets/drag-and-drop-widget Expand file tree Collapse file tree 7 files changed +20
-18
lines changed Original file line number Diff line number Diff line change 33### [ Live Demo] ( https://dnd-lts-sandbox.mxapps.io/p/example_1?profile=Responsive )
44
55To show how to use the widget I will be using the examples in the test project. You can find the Example Project
6- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /dnd_lts.mpk ) or
6+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /dnd_lts.mpk ) or
77if you only want the Helpers
8- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /DnD_HelpersModule.mpk )
8+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /DnD_HelpersModule.mpk )
99and the Examples
10- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /DnD_Examples.mpk )
10+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /DnD_Examples.mpk )
1111
1212Get a ☕️ and lets go...
1313
Original file line number Diff line number Diff line change 33### [ Live Demo] ( https://dnd-lts-sandbox.mxapps.io/p/example_2?profile=Responsive )
44
55To show how to use the widget I will be using the examples in the test project. You can find the Example Project
6- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /dnd_lts.mpk ) or
6+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /dnd_lts.mpk ) or
77if you only want the Helpers
8- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /DnD_HelpersModule.mpk )
8+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /DnD_HelpersModule.mpk )
99and the Examples
10- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /DnD_Examples.mpk )
10+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /DnD_Examples.mpk )
1111
1212Get a ☕️ and lets go...
1313
Original file line number Diff line number Diff line change 33### [ Live Demo] ( https://dnd-lts-sandbox.mxapps.io/p/example_3?profile=Responsive )
44
55To show how to use the widget I will be using the examples in the test project. You can find the Example Project
6- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /dnd_lts.mpk ) or
6+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /dnd_lts.mpk ) or
77if you only want the Helpers
8- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /DnD_HelpersModule.mpk )
8+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /DnD_HelpersModule.mpk )
99and the Examples
10- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /DnD_Examples.mpk )
10+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /DnD_Examples.mpk )
1111
1212Get a ☕️ and lets go...
1313
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ We have a playable Demo [here](https://dnd-lts-sandbox.mxapps.io/index.html?prof
2222## How to use the Widget via examples
2323
2424To show how to use the widget I will be using the examples in the test project. You can find the Example Project
25- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /dnd_lts.mpk ) or
25+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /dnd_lts.mpk ) or
2626if you only want the Helpers
27- [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.0 /DnD_HelpersModule.mpk )
27+ [ here] ( https://github.com/mendixlabs/app-services-components/releases/download/draganddropwidget%403.0.2 /DnD_HelpersModule.mpk )
2828and the Examples [ here] ( https://dnd-lts-sandbox.mxapps.io/p/example_1?profile=Responsive )
2929
3030## Examples
Original file line number Diff line number Diff line change 11{
22 "name" : " draganddropwidget" ,
33 "widgetName" : " Draganddropwidget" ,
4- "version" : " 3.0.1 " ,
4+ "version" : " 3.0.2 " ,
55 "description" : " My widget description" ,
66 "copyright" : " 2022 Mendix Technology BV" ,
77 "author" : " ahwelgemoed" ,
Original file line number Diff line number Diff line change @@ -38,15 +38,17 @@ const DndWidget: FunctionComponent<DraganddropwidgetContainerProps> = props => {
3838 const [ isOverIndex , setIsOverIndex ] = useState < null | number > ( null ) ;
3939
4040 /**
41- * We give a Child comp a way to get its parents parent. NOTE: This will only ever work 2n
41+ * We give a Child comp a way to get its parents parent. NOTE: This will only ever work 2n and does not recalculate on Window resize
4242 */
4343 useEffect ( ( ) => {
4444 if ( uuidParent ) {
4545 const myParent = document . querySelectorAll ( `[data-uuid="${ uuidParent } "]` ) ;
46- // @ts -ignore
47- const containerName = myParent [ 0 ] && myParent [ 0 ] . attributes [ "data-containing-uuid" ] . value ;
48- if ( containerName ) {
49- parentContainerName . current = document . getElementById ( containerName ) as HTMLDivElement ;
46+ if ( myParent . length ) {
47+ // @ts -ignore
48+ const containerName = myParent [ 0 ] ?. attributes [ "data-containing-uuid" ] . value ;
49+ if ( containerName ) {
50+ parentContainerName . current = document . getElementById ( containerName ) as HTMLDivElement ;
51+ }
5052 }
5153 }
5254 } , [ uuidParent ] ) ;
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<package xmlns =" http://www.mendix.com/package/1.0/" >
3- <clientModule name =" Draganddropwidget" version =" 3.0.1 " xmlns =" http://www.mendix.com/clientModule/1.0/" >
3+ <clientModule name =" Draganddropwidget" version =" 3.0.2 " xmlns =" http://www.mendix.com/clientModule/1.0/" >
44 <widgetFiles >
55 <widgetFile path =" Draganddropwidget.xml" />
66 </widgetFiles >
You can’t perform that action at this time.
0 commit comments