File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -607,10 +607,10 @@ export const TableBody = React.memo(
607
607
const { originalEvent : event } = e ;
608
608
609
609
if ( ! isUnsyled && DomHandler . hasClass ( event . target , 'p-datatable-reorderablerow-handle' ) ) {
610
- event . currentTarget ? .draggable = true ;
611
- event . target ? .draggable = false ;
610
+ event . currentTarget . draggable = true ;
611
+ event . target . draggable = false ;
612
612
} else {
613
- event . currentTarget ? .draggable = false ;
613
+ event . currentTarget . draggable = false ;
614
614
}
615
615
616
616
if ( allowRowDrag ( e ) ) {
Original file line number Diff line number Diff line change 1
1
import React , { useContext , useRef , useState } from 'react' ;
2
2
import { PrimeReactContext , ariaLabel } from '../api/Api' ;
3
3
import { useHandleStyle } from '../componentbase/ComponentBase' ;
4
- import { useMergeProps } from '../hooks/Hooks' ;
4
+ import { useMergeProps , useUpdateEffect } from '../hooks/Hooks' ;
5
5
import { InputText } from '../inputtext/InputText' ;
6
6
import { ObjectUtils } from '../utils/Utils' ;
7
7
import { InputOtpBase } from './BaseInputOtp' ;
@@ -174,6 +174,12 @@ export const InputOtp = React.memo(
174
174
}
175
175
} ;
176
176
177
+ useUpdateEffect ( ( ) => {
178
+ const value = props . value ? props . value ?. toString ( ) ?. split ?. ( '' ) : new Array ( props . length ) ;
179
+
180
+ setTokens ( value ) ;
181
+ } , [ props . value ] ) ;
182
+
177
183
const createInputElements = ( remainingInputs ) => {
178
184
if ( remainingInputs <= 0 ) {
179
185
return [ ] ;
You can’t perform that action at this time.
0 commit comments