@@ -52,27 +52,27 @@ export function useFormKitSchema() {
5252 return array
5353 }
5454
55- data . addNode = ( node : any ) => ( ) : void => {
56- const newArray : any [ ] = [ ...node . value , addNodeDefaultObject ]
57- node . input ( newArray , false )
55+ data . addNode = ( parentNode : any ) => ( ) : void => {
56+ const newArray : any [ ] = [ ...parentNode . value , addNodeDefaultObject ]
57+ parentNode . input ( newArray , false )
5858 }
59- data . removeNode = ( node : any , index : number ) => ( ) : void => {
60- node . input ( node . _value . filter ( ( _ : any , i : number ) : boolean => i !== index ) , false )
59+ data . removeNode = ( parentNode : any , index : number ) => ( ) : void => {
60+ parentNode . input ( parentNode . _value . filter ( ( _ : any , i : number ) : boolean => i !== index ) , false )
6161 }
62- data . moveNodeUp = ( node : any , index : number ) => ( ) : void => {
63- const array : any [ ] = [ ...node . value ]
62+ data . moveNodeUp = ( parentNode : any , index : number ) => ( ) : void => {
63+ const array : any [ ] = [ ...parentNode . value ]
6464 if ( index > 0 )
65- node . input ( swapElements ( array , index - 1 , index ) , false )
65+ parentNode . input ( swapElements ( array , index - 1 , index ) , false )
6666 }
67- data . moveNodeDown = ( node : any , index : number ) => ( ) : void => {
68- const array : any [ ] = [ ...node . value ]
67+ data . moveNodeDown = ( parentNode : any , index : number ) => ( ) : void => {
68+ const array : any [ ] = [ ...parentNode . value ]
6969 if ( index < array . length - 1 )
70- node . input ( swapElements ( array , index , index + 1 ) , false )
70+ parentNode . input ( swapElements ( array , index , index + 1 ) , false )
7171 }
72- data . copyNode = ( node : any , index : number ) => ( ) : void => {
73- const obj : any = node . value [ index ]
74- const newArray : any [ ] = [ ...node . value , { ...obj } ]
75- node . input ( newArray , false )
72+ data . copyNode = ( parentNode : any , index : number ) => ( ) : void => {
73+ const obj : any = parentNode . value [ index ]
74+ const newArray : any [ ] = [ ...parentNode . value , { ...obj } ]
75+ parentNode . input ( newArray , false )
7676 }
7777 }
7878
0 commit comments