File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -628,15 +628,15 @@ export const BodyCell = React.memo((props) => {
628
628
) ;
629
629
} else if ( rowReorder ) {
630
630
const showReorder = props . showRowReorderElement ? props . showRowReorderElement ( props . rowData , { rowIndex : props . rowIndex , props : props . tableProps } ) : true ;
631
-
632
- const customIcon = getColumnProp ( 'rowReorderIcon' )
631
+
632
+ const customIcon = getColumnProp ( 'rowReorderIcon' ) ;
633
633
const rowReorderIconProps = mergeProps (
634
634
{
635
635
className : cx ( 'rowReorderIcon' )
636
636
} ,
637
- customIcon ? null : getColumnPTOptions ( 'rowReorderIcon' )
637
+ customIcon ? null : getColumnPTOptions ( 'rowReorderIcon' )
638
638
) ;
639
-
639
+
640
640
const rowReorderIcon = customIcon || < BarsIcon { ...rowReorderIconProps } /> ;
641
641
642
642
content = showReorder ? IconUtils . getJSXIcon ( rowReorderIcon , { ...rowReorderIconProps } , { props } ) : null ;
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