@@ -494,7 +494,6 @@ export const App = () => {
494494
495495 let columns = gridInstance . getColumns ( ) ;
496496 let commandColumn = columns . find ( col => col . headerText === 'Commands' ) ;
497-
498497 setDropdownValues ( ( prev ) => {
499498 if ( selectedListItemRef . current === "Selection Settings" ) {
500499 gridInstance . selectionSettings . checkboxMode = prev . checkboxmodedefault as CheckboxSelectionType ;
@@ -505,12 +504,17 @@ export const App = () => {
505504 }
506505 else if ( selectedListItemRef . current === "Edit Settings" ) {
507506 gridInstance . editSettings . newRowPosition = prev . newrowposition as NewRowPosition ;
508- gridInstance . editSettings . mode = prev . editmode as EditMode ;
509507 if ( prev . editmode === 'Batch' && commandColumn ) {
510508 commandColumn . visible = false ;
511509 gridInstance . refreshColumns ( ) ;
512510 gridInstance . toolbar = gridProperties . toolbarOptions . filter ( item => item !== 'Edit' ) ;
511+ } else if ( prev . editmode !== 'Batch' && commandColumn ) {
512+ commandColumn . visible = true ;
513+ gridInstance . refreshColumns ( ) ;
514+ gridInstance . toolbar = gridProperties . toolbarOptions . filter ( item => item !== 'Edit' && item !== 'Update' && item !== 'Delete' && item !== 'Cancel' ) ;
515+ dialogObj ?. hide ( ) ;
513516 }
517+ gridInstance . editSettings . mode = prev . editmode as EditMode ;
514518 }
515519 else if ( selectedListItemRef . current === "Filter Settings" ) {
516520 gridInstance . filterSettings . type = prev . filtertype as FilterType ;
@@ -562,18 +566,15 @@ export const App = () => {
562566 }
563567 else if ( selectedListItemRef . current === "Edit Settings" ) {
564568 gridInstance . editSettings . allowAdding = prev . adding ;
565- gridInstance . editSettings . allowDeleting = prev . deleting ;
566569 gridInstance . editSettings . allowEditOnDblClick = prev . editondoubleclick ;
567- gridInstance . editSettings . allowEditing = prev . editing ;
568570 if ( ( ! prev . editing || ! prev . deleting ) && commandColumn ) {
569571 commandColumn . visible = false ;
570572 gridInstance . refreshColumns ( ) ;
571573 gridInstance . toolbar = gridInstance . editSettings . mode === 'Batch' ? gridProperties . toolbarOptions . filter ( item => item !== 'Edit' ) : ! prev . deleting ? gridProperties . toolbarOptions . filter ( item => item !== 'Delete' ) : gridProperties . toolbarOptions ;
572- } else if ( gridInstance . editSettings . mode !== 'Batch' && prev . editing && commandColumn ) {
573- commandColumn . visible = true ;
574- gridInstance . refreshColumns ( ) ;
575- gridInstance . toolbar = gridProperties . toolbarOptions . filter ( item => item !== 'Edit' && item !== 'Update' && item !== 'Delete' && item !== 'Cancel' ) ;
574+ dialogObj ?. hide ( ) ;
576575 }
576+ gridInstance . editSettings . allowEditing = prev . editing ;
577+ gridInstance . editSettings . allowDeleting = prev . deleting ;
577578 gridInstance . editSettings . allowNextRowEdit = prev . nextrowedit ;
578579 gridInstance . editSettings . showConfirmDialog = prev . confirmdialog ;
579580 gridInstance . editSettings . showDeleteConfirmDialog = prev . deletedialog ;
@@ -1004,7 +1005,6 @@ export const App = () => {
10041005 if ( listMainContent ) {
10051006 listMainContent . remove ( ) ;
10061007 }
1007-
10081008 return (
10091009 < div id = "sblist-wrapper" className = "control-section" >
10101010 < div id = "sidelistwrapper" >
@@ -1067,15 +1067,6 @@ export const App = () => {
10671067
10681068
10691069 settingsDialogTemplate : ( ) : JSX . Element => {
1070- const dialogContainers = document . querySelectorAll ( '#example_dialog' ) ;
1071- // If more than one instance exists, skip rendering and return settings icon.
1072- if ( dialogContainers . length > 1 ) {
1073- return (
1074- < div style = { { marginTop : '4px' } } >
1075- < span style = { { fontSize : '16px' } } id = "walk_property_settings" className = 'e-icons e-settings icon' > </ span >
1076- </ div >
1077- ) ;
1078- }
10791070 return (
10801071 < div style = { { marginTop : '4px' } } >
10811072 < span style = { { fontSize : '16px' } } id = "walk_property_settings" className = 'e-icons e-settings icon' > </ span >
0 commit comments