@topconsultnpm/sdkui-react-beta 6.8.38 → 6.8.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
3
3
  import { DataGrid } from 'devextreme-react';
4
4
  import { Column, Paging, Scrolling, Selection, LoadPanel, SearchPanel, Summary, TotalItem, HeaderFilter, Grouping, Pager } from 'devextreme-react/cjs/data-grid';
5
5
  import { SDK_Globals } from '@topconsultnpm/sdk-ts-beta';
6
- import { IconApply, IconHide, IconRefresh, IconShow, SDKUI_Globals, SDKUI_Localizator } from '../../helper';
6
+ import { IconApply, IconHide, IconRefresh, IconShow, SDKUI_Globals, SDKUI_Localizator, sleep } from '../../helper';
7
7
  import TMButton from '../base/TMButton';
8
8
  import TMToggleButton from '../base/TMToggleButton';
9
9
  import TMModal from '../base/TMModal';
@@ -47,10 +47,11 @@ const TMChooserForm = ({ children, title, allowMultipleSelection, hasShowOnlySel
47
47
  setIsInitialized(true);
48
48
  }
49
49
  }
50
- }, onRowDblClick: () => { if (!allowMultipleSelection) {
50
+ }, onRowDblClick: async () => {
51
+ await sleep(300); //wait for DX-DataGrid selectionChanged
51
52
  onChoose?.(getSelectedIDs());
52
53
  onClose?.();
53
- } }, onSelectionChanged: (e) => { setSelectedItems(e.selectedRowsData); }, onToolbarPreparing: (e) => { e.toolbarOptions.items.forEach((item) => { if (item.name === "searchPanel")
54
+ }, onSelectionChanged: (e) => { setSelectedItems(e.selectedRowsData); }, onToolbarPreparing: (e) => { e.toolbarOptions.items.forEach((item) => { if (item.name === "searchPanel")
54
55
  item.location = "before"; }); }, children: [cellRenderIcon && _jsx(Column, { width: 30, allowResizing: false, allowFiltering: false, allowSorting: false, cellRender: cellRenderIcon }, 0), showDefaultColumns && _jsx(Column, { dataField: "id", visible: showId, dataType: 'number' }, 1), showDefaultColumns && _jsx(Column, { dataField: SDK_Globals.useLocalizedName && manageUseLocalizedName ? "nameLoc" : "name", caption: SDKUI_Localizator.Name, dataType: 'string', defaultSortOrder: allowSorting ? "asc" : undefined, cellRender: cellRenderNameAndDesc }, 2), showDefaultColumns && _jsx(Column, { dataField: "description", dataType: 'string', caption: SDKUI_Localizator.Description, cellRender: cellRenderNameAndDesc }, 3), columns, allowGrouping && _jsx(Grouping, { autoExpandAll: false, expandMode: 'rowClick' }), _jsx(HeaderFilter, { visible: true }), _jsx(Selection, { mode: allowMultipleSelection ? "multiple" : "single", showCheckBoxesMode: "onClick", selectAllMode: 'allPages' }), _jsx(Scrolling, { mode: "virtual", useNative: SDKUI_Globals.dataGridUseNativeScrollbar }), _jsx(LoadPanel, { enabled: true }), _jsx(SearchPanel, { visible: true }), _jsx(Paging, { pageSize: 100 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsxs(Summary, { children: [_jsx(TotalItem, { column: SDK_Globals.useLocalizedName && manageUseLocalizedName ? "nameLoc" : "name", summaryType: "count" }), summaryItems] })] }) }));
55
56
  };
56
57
  export default TMChooserForm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.8.38",
3
+ "version": "6.8.40",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",