@adaptabletools/adaptable-cjs 21.0.0-canary.1 → 21.0.0-canary.3
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.
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -2
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -1
- package/src/AdaptableOptions/EditOptions.d.ts +6 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +20 -8
- package/src/AdaptableOptions/LayoutOptions.d.ts +3 -0
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +2 -2
- package/src/Api/ColumnFilterApi.d.ts +5 -5
- package/src/Api/Implementation/ColumnApiImpl.js +1 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +3 -3
- package/src/Api/Implementation/ColumnFilterApiImpl.js +6 -6
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +3 -3
- package/src/Api/Internal/ColumnFilterInternalApi.js +19 -24
- package/src/Api/Internal/ColumnInternalApi.js +1 -1
- package/src/Api/Internal/GridInternalApi.d.ts +3 -2
- package/src/Api/Internal/GridInternalApi.js +3 -2
- package/src/Api/Internal/PredicateInternalApi.js +0 -1
- package/src/Redux/Store/AdaptableStore.js +0 -2
- package/src/Strategy/ColumnFilterModule.js +8 -1
- package/src/Utilities/adaptableQlUtils.js +1 -1
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.d.ts +5 -1
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +52 -16
- package/src/View/Components/ColumnFilter/utils.js +0 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
- package/src/View/Components/PredicateEditor/PredicateEditor.js +14 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +2 -4
- package/src/View/Components/Selectors/PermittedValuesSelector.js +6 -5
- package/src/agGrid/AdaptableAgGrid.d.ts +3 -2
- package/src/agGrid/AdaptableAgGrid.js +20 -10
- package/src/agGrid/AdaptableFilterHandler.d.ts +12 -4
- package/src/agGrid/AdaptableFilterHandler.js +38 -11
- package/src/agGrid/AgGridColumnAdapter.js +5 -2
- package/src/agGrid/AgGridExportAdapter.js +2 -4
- package/src/agGrid/AgGridModulesAdapter.js +5 -1
- package/src/agGrid/agGridDataTypeDefinitions.js +1 -8
- package/src/components/Select/Select.d.ts +1 -0
- package/src/components/Select/Select.js +5 -4
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +15 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade20.js +1 -2
- package/src/types.d.ts +2 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -26,9 +26,7 @@ const PermittedValuesSelector = function (props) {
|
|
|
26
26
|
(async () => {
|
|
27
27
|
let searchValueUsedInFilterValue = false;
|
|
28
28
|
const currentSearchValue = searchFilterRef.current;
|
|
29
|
-
const
|
|
30
|
-
// we are here ALWAYS getting Filter values but sometimes we want to get other things!!!
|
|
31
|
-
props.loadValues
|
|
29
|
+
const p = props.loadValues
|
|
32
30
|
? props.loadValues({
|
|
33
31
|
get currentSearchValue() {
|
|
34
32
|
searchValueUsedInFilterValue = true;
|
|
@@ -41,12 +39,15 @@ const PermittedValuesSelector = function (props) {
|
|
|
41
39
|
searchValueUsedInFilterValue = true;
|
|
42
40
|
return currentSearchValue;
|
|
43
41
|
},
|
|
44
|
-
})
|
|
42
|
+
});
|
|
43
|
+
const distinctColumnValues = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(
|
|
44
|
+
// we are here ALWAYS getting Filter values but sometimes we want to get other things!!!
|
|
45
|
+
p, () => {
|
|
45
46
|
setIsLoading(true);
|
|
46
47
|
});
|
|
47
48
|
setSearchValueWasUsedWhenFiltering(searchValueUsedInFilterValue);
|
|
48
49
|
setIsLoading(false);
|
|
49
|
-
setOptions(distinctColumnValues);
|
|
50
|
+
setOptions(Array.isArray(distinctColumnValues) ? distinctColumnValues : distinctColumnValues.values);
|
|
50
51
|
})();
|
|
51
52
|
}, [props.columnId, props.loadValues, refetchKey]);
|
|
52
53
|
const isCreatable = (props.allowNewValues && !dataType) || ['text', 'number'].includes(dataType);
|
|
@@ -21,7 +21,7 @@ import { Fdc3Service } from '../Utilities/Services/Fdc3Service';
|
|
|
21
21
|
import { AnnotationsService } from '../Utilities/Services/AnnotationsService';
|
|
22
22
|
import { IModuleCollection } from '../Strategy/Interface/IModule';
|
|
23
23
|
import { AgGridMenuAdapter } from './AgGridMenuAdapter';
|
|
24
|
-
import { AdaptableColumn, AdaptableTheme, ChartDefinition, ColumnSort, DataUpdateConfig, GridCell,
|
|
24
|
+
import { AdaptableColumn, AdaptableTheme, ChartDefinition, ColumnSort, InFilterValueResult, DataUpdateConfig, GridCell, Layout, SelectedCellInfo, SelectedRowInfo } from '../types';
|
|
25
25
|
import { RenderReactRootFn } from '../renderReactRoot';
|
|
26
26
|
import { AgGridOptionsService } from './AgGridOptionsService';
|
|
27
27
|
import { AgGridColumnAdapter } from './AgGridColumnAdapter';
|
|
@@ -257,7 +257,8 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
257
257
|
getDistinctFilterValuesForColumn(options: {
|
|
258
258
|
column: AdaptableColumn;
|
|
259
259
|
currentSearchValue: string;
|
|
260
|
-
|
|
260
|
+
previousResult: InFilterValueResult | undefined;
|
|
261
|
+
}): Promise<InFilterValueResult>;
|
|
261
262
|
getDistinctEditValuesForColumn(options: {
|
|
262
263
|
column: AdaptableColumn;
|
|
263
264
|
currentSearchValue: string;
|
|
@@ -432,7 +432,6 @@ class AdaptableAgGrid {
|
|
|
432
432
|
this.lifecycleState = 'available';
|
|
433
433
|
this.api.themeApi.applyCurrentTheme();
|
|
434
434
|
this.validatePrimaryKey();
|
|
435
|
-
// TODO AFL MIG: we could just patch the defautl Layout on init? instead
|
|
436
435
|
this.checkShouldClearExistingFiltersOrSearches();
|
|
437
436
|
// FIXME AFL FILTER: talk with Radu: should ColumnFilters still be ignored?!
|
|
438
437
|
// see layoutModel.Ignore_ColumnFilters
|
|
@@ -1857,7 +1856,7 @@ You need to define at least one Layout!`);
|
|
|
1857
1856
|
if (dataType === 'boolean') {
|
|
1858
1857
|
return typeof rawValue !== 'boolean' ? Boolean(rawValue) : rawValue;
|
|
1859
1858
|
}
|
|
1860
|
-
if (dataType === 'date'
|
|
1859
|
+
if (dataType === 'date') {
|
|
1861
1860
|
return rawValue instanceof Date ? rawValue : (0, DateHelper_1.parseDateValue)(rawValue);
|
|
1862
1861
|
}
|
|
1863
1862
|
return rawValue;
|
|
@@ -2258,10 +2257,19 @@ You need to define at least one Layout!`);
|
|
|
2258
2257
|
return this.getDistinctGridCellsForColumn(column);
|
|
2259
2258
|
}
|
|
2260
2259
|
async getDistinctFilterValuesForColumn(options) {
|
|
2261
|
-
const { column } = options;
|
|
2260
|
+
const { column, previousResult } = options;
|
|
2262
2261
|
const self = this;
|
|
2263
2262
|
// First get the Grid Cells in the Column
|
|
2264
|
-
|
|
2263
|
+
let currentGridCells;
|
|
2264
|
+
const getCurrentGridCells = () => {
|
|
2265
|
+
// we do this in a function so it's lazy
|
|
2266
|
+
// but we also store in the outside closure, so we can reuse the value if
|
|
2267
|
+
// already called
|
|
2268
|
+
if (currentGridCells) {
|
|
2269
|
+
return currentGridCells;
|
|
2270
|
+
}
|
|
2271
|
+
return (currentGridCells = this.getDistinctGridCellsForColumn(column));
|
|
2272
|
+
};
|
|
2265
2273
|
// If there are custom distinct value, return them; otherwise return the Grids Cells just retrieved
|
|
2266
2274
|
const customInFilterValues = this.adaptableOptions.filterOptions.customInFilterValues;
|
|
2267
2275
|
if (customInFilterValues) {
|
|
@@ -2269,12 +2277,13 @@ You need to define at least one Layout!`);
|
|
|
2269
2277
|
const customInFilterValuesContext = {
|
|
2270
2278
|
...this.api.internalApi.buildBaseContext(),
|
|
2271
2279
|
column,
|
|
2280
|
+
previousFilterResult: previousResult,
|
|
2272
2281
|
get currentSearchValue() {
|
|
2273
2282
|
return options.currentSearchValue;
|
|
2274
2283
|
},
|
|
2275
2284
|
get sortedValues() {
|
|
2276
2285
|
const result = gridApiInternal
|
|
2277
|
-
.sortDistinctValues(
|
|
2286
|
+
.sortDistinctValues(getCurrentGridCells(), column)
|
|
2278
2287
|
.map((gridCell) => {
|
|
2279
2288
|
return {
|
|
2280
2289
|
label: gridCell.displayValue,
|
|
@@ -2293,7 +2302,7 @@ You need to define at least one Layout!`);
|
|
|
2293
2302
|
return result;
|
|
2294
2303
|
},
|
|
2295
2304
|
get defaultValues() {
|
|
2296
|
-
const result =
|
|
2305
|
+
const result = getCurrentGridCells().map((gridCell) => {
|
|
2297
2306
|
return {
|
|
2298
2307
|
label: gridCell.displayValue,
|
|
2299
2308
|
value: gridCell.rawValue,
|
|
@@ -2331,23 +2340,24 @@ You need to define at least one Layout!`);
|
|
|
2331
2340
|
return result;
|
|
2332
2341
|
},
|
|
2333
2342
|
};
|
|
2334
|
-
let
|
|
2343
|
+
let customInFilterValuesResult;
|
|
2335
2344
|
try {
|
|
2336
|
-
|
|
2345
|
+
customInFilterValuesResult = await customInFilterValues(customInFilterValuesContext);
|
|
2337
2346
|
}
|
|
2338
2347
|
catch (error) {
|
|
2339
2348
|
this.logger.consoleError(`Failed to fetch custom filter values`, column, error);
|
|
2340
2349
|
}
|
|
2341
|
-
return
|
|
2350
|
+
return customInFilterValuesResult;
|
|
2342
2351
|
}
|
|
2343
2352
|
// No distinct values so lets return unique grid cells
|
|
2344
|
-
|
|
2353
|
+
const values = getCurrentGridCells().map((gridCell) => {
|
|
2345
2354
|
const inFilterValue = {
|
|
2346
2355
|
value: gridCell.rawValue,
|
|
2347
2356
|
label: gridCell.displayValue,
|
|
2348
2357
|
};
|
|
2349
2358
|
return inFilterValue;
|
|
2350
2359
|
});
|
|
2360
|
+
return { values };
|
|
2351
2361
|
}
|
|
2352
2362
|
async getDistinctEditValuesForColumn(options) {
|
|
2353
2363
|
const { column, gridCell } = options;
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { DoesFilterPassParams, FilterHandler, FilterHandlerParams } from 'ag-grid-enterprise';
|
|
2
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
3
|
import { ColumnSetupInfo } from '../AdaptableState/Common/ColumnSetupInfo';
|
|
4
|
-
import {
|
|
4
|
+
import { InFilterValueResult } from '../AdaptableOptions/FilterOptions';
|
|
5
5
|
export declare class AdaptableFilterHandler implements FilterHandler {
|
|
6
6
|
private adaptableApi;
|
|
7
7
|
readonly colId: string;
|
|
8
|
-
private
|
|
8
|
+
private filterDisplayValuesResult;
|
|
9
|
+
private previousFilterDisplayValuesResult;
|
|
9
10
|
constructor(adaptableApi: AdaptableApi, columnSetup: ColumnSetupInfo);
|
|
10
11
|
doesFilterPass(params: DoesFilterPassParams): boolean;
|
|
11
|
-
|
|
12
|
+
getCachedFilterDisplayValues(): InFilterValueResult | undefined;
|
|
13
|
+
getLastCachedFilterDisplayValues(): InFilterValueResult | undefined;
|
|
14
|
+
getFromCacheOrFetchFilterDisplayValues(options: {
|
|
15
|
+
currentSearchValue: string;
|
|
16
|
+
}): Promise<InFilterValueResult>;
|
|
17
|
+
fetchFilterDisplayValues(options: {
|
|
18
|
+
currentSearchValue: string;
|
|
19
|
+
}): Promise<InFilterValueResult>;
|
|
12
20
|
onNewRowsLoaded(): void;
|
|
13
21
|
onAnyFilterChanged(): void;
|
|
14
22
|
resetFilterDisplayValues(): void;
|
|
15
|
-
refreshFilterDisplayValues(): Promise<
|
|
23
|
+
refreshFilterDisplayValues(): Promise<InFilterValueResult>;
|
|
16
24
|
refresh(params: FilterHandlerParams<any, any, any, any>): void;
|
|
17
25
|
destroy(): void;
|
|
18
26
|
}
|
|
@@ -30,36 +30,63 @@ class AdaptableFilterHandler {
|
|
|
30
30
|
return false;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
getCachedFilterDisplayValues() {
|
|
34
|
+
return this.filterDisplayValuesResult;
|
|
35
|
+
}
|
|
36
|
+
getLastCachedFilterDisplayValues() {
|
|
37
|
+
return this.filterDisplayValuesResult ?? this.previousFilterDisplayValuesResult;
|
|
38
|
+
}
|
|
39
|
+
getFromCacheOrFetchFilterDisplayValues(options) {
|
|
40
|
+
if (this.filterDisplayValuesResult) {
|
|
41
|
+
return Promise.resolve(this.filterDisplayValuesResult);
|
|
40
42
|
}
|
|
41
|
-
return this.
|
|
43
|
+
return this.fetchFilterDisplayValues(options);
|
|
44
|
+
}
|
|
45
|
+
fetchFilterDisplayValues(options) {
|
|
46
|
+
return this.adaptableApi.gridApi.internalApi
|
|
47
|
+
.getDistinctFilterDisplayValuesForColumn({
|
|
48
|
+
columnId: this.colId,
|
|
49
|
+
get currentSearchValue() {
|
|
50
|
+
return options.currentSearchValue;
|
|
51
|
+
},
|
|
52
|
+
previousResult: this.filterDisplayValuesResult,
|
|
53
|
+
})
|
|
54
|
+
.then((result) => {
|
|
55
|
+
this.filterDisplayValuesResult = result;
|
|
56
|
+
return result;
|
|
57
|
+
});
|
|
42
58
|
}
|
|
43
59
|
onNewRowsLoaded() {
|
|
44
60
|
this.resetFilterDisplayValues();
|
|
45
61
|
}
|
|
46
62
|
onAnyFilterChanged() {
|
|
63
|
+
const filterOptions = this.adaptableApi.optionsApi.getFilterOptions();
|
|
64
|
+
if (!filterOptions.customInFilterValues) {
|
|
65
|
+
// no-one is using value.count or value.visible
|
|
66
|
+
// or context.sortedValues
|
|
67
|
+
// so no need to reset the filter display values
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
47
70
|
this.resetFilterDisplayValues();
|
|
48
71
|
}
|
|
49
72
|
resetFilterDisplayValues() {
|
|
73
|
+
if (this.filterDisplayValuesResult) {
|
|
74
|
+
this.previousFilterDisplayValuesResult = this.filterDisplayValuesResult;
|
|
75
|
+
}
|
|
50
76
|
// Reset the filter display values manually
|
|
51
|
-
this.
|
|
77
|
+
this.filterDisplayValuesResult = undefined;
|
|
52
78
|
}
|
|
53
79
|
async refreshFilterDisplayValues() {
|
|
54
80
|
this.resetFilterDisplayValues();
|
|
55
|
-
return this.
|
|
81
|
+
return this.getFromCacheOrFetchFilterDisplayValues({ currentSearchValue: '' });
|
|
56
82
|
}
|
|
57
83
|
refresh(params) {
|
|
58
84
|
// No specific refresh logic needed for this handler
|
|
59
85
|
// The filter display values will be reset on new rows loaded or any filter changed
|
|
60
86
|
}
|
|
61
87
|
destroy() {
|
|
62
|
-
this.
|
|
88
|
+
this.filterDisplayValuesResult = undefined;
|
|
89
|
+
this.previousFilterDisplayValuesResult = undefined;
|
|
63
90
|
}
|
|
64
91
|
}
|
|
65
92
|
exports.AdaptableFilterHandler = AdaptableFilterHandler;
|
|
@@ -24,7 +24,7 @@ function getEditorForColumnDataType(columnDataType, variant) {
|
|
|
24
24
|
if (columnDataType === 'number') {
|
|
25
25
|
return variant === 'react' ? AdaptableNumberEditor_1.AdaptableReactNumberEditor : AdaptableNumberEditor_1.AdaptableNumberEditor;
|
|
26
26
|
}
|
|
27
|
-
if (columnDataType === 'date'
|
|
27
|
+
if (columnDataType === 'date') {
|
|
28
28
|
return variant === 'react' ? AdaptableDateEditor_1.AdaptableReactDateEditor : AdaptableDateEditor_1.AdaptableDateEditor;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -511,7 +511,10 @@ class AgGridColumnAdapter {
|
|
|
511
511
|
: Array.isArray(original_columnType)
|
|
512
512
|
? original_columnType
|
|
513
513
|
: [original_columnType];
|
|
514
|
-
|
|
514
|
+
// Adaptable uses type 'date' for all date columns, while AG Grid uses 'date' and 'dateString'
|
|
515
|
+
// #data_type_dateString
|
|
516
|
+
let normalisedTypes = originalTypes.map((t) => (t === 'dateString' ? 'date' : t));
|
|
517
|
+
const columnTypes = new Set(normalisedTypes);
|
|
515
518
|
if (this.adaptableApi.columnApi.isCalculatedColumn(colId)) {
|
|
516
519
|
columnTypes.add(AdaptableColumn_1.CALCULATED_COLUMN_TYPE);
|
|
517
520
|
}
|
|
@@ -435,7 +435,7 @@ class AgGridExportAdapter {
|
|
|
435
435
|
return;
|
|
436
436
|
}
|
|
437
437
|
const columnDataType = this.adaptableApi.columnApi.getColumnDataTypeForColumnId(columnId);
|
|
438
|
-
if (
|
|
438
|
+
if (columnDataType === 'date' &&
|
|
439
439
|
typeof rawValue === 'string' &&
|
|
440
440
|
// rawValue is composed only of digits
|
|
441
441
|
/^\d+$/.test(rawValue)) {
|
|
@@ -693,7 +693,6 @@ class AgGridExportAdapter {
|
|
|
693
693
|
case 'boolean':
|
|
694
694
|
return 'Boolean';
|
|
695
695
|
case 'date':
|
|
696
|
-
case 'dateString':
|
|
697
696
|
return 'DateTime';
|
|
698
697
|
case 'text':
|
|
699
698
|
default:
|
|
@@ -823,7 +822,7 @@ class AgGridExportAdapter {
|
|
|
823
822
|
if (exportContext.isVisualExcelReport) {
|
|
824
823
|
return this.getCellExportValueFromRawValueByType(rowNode, cellRawValue, columnId, 'formattedValue');
|
|
825
824
|
}
|
|
826
|
-
const isDateColumn = columnDataType === 'date'
|
|
825
|
+
const isDateColumn = columnDataType === 'date';
|
|
827
826
|
// 2. if this is a date column and there is a custom export date format provided, that will next take precedence
|
|
828
827
|
if (isDateColumn) {
|
|
829
828
|
const customExportDateFormat = this.getCustomExportDateFormat(column, exportContext);
|
|
@@ -881,7 +880,6 @@ class AgGridExportAdapter {
|
|
|
881
880
|
case 'number':
|
|
882
881
|
return dataFormatDataType.number;
|
|
883
882
|
case 'date':
|
|
884
|
-
case 'dateString':
|
|
885
883
|
return dataFormatDataType.date;
|
|
886
884
|
default:
|
|
887
885
|
// default to rawValue for all other column types
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AgGridModulesAdapter = exports.AG_GRID_VERSION = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
4
5
|
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
5
6
|
exports.AG_GRID_VERSION = ag_grid_enterprise_1.AllEnterpriseModule.version;
|
|
6
7
|
class AgGridModulesAdapter {
|
|
@@ -45,7 +46,10 @@ class AgGridModulesAdapter {
|
|
|
45
46
|
mandatoryModules.push('ServerSideRowModelApiModule');
|
|
46
47
|
break;
|
|
47
48
|
case 'infinite':
|
|
48
|
-
|
|
49
|
+
_1.AdaptableLogger.consoleErrorBase("AdapTable does not support AG Grid's Infinite Row Model");
|
|
50
|
+
break;
|
|
51
|
+
case 'viewport':
|
|
52
|
+
mandatoryModules.push('ViewportRowModelModule');
|
|
49
53
|
break;
|
|
50
54
|
default:
|
|
51
55
|
mandatoryModules.push('ClientSideRowModelModule');
|
|
@@ -10,7 +10,6 @@ exports.ALL_ADAPTABLE_DATA_TYPES = [
|
|
|
10
10
|
'number',
|
|
11
11
|
'boolean',
|
|
12
12
|
'date',
|
|
13
|
-
'dateString',
|
|
14
13
|
'object',
|
|
15
14
|
exports.TEXT_ARRAY_DATA_TYPE,
|
|
16
15
|
exports.NUMBER_ARRAY_DATA_TYPE,
|
|
@@ -34,13 +33,7 @@ exports.agGridDataTypeDefinitions = {
|
|
|
34
33
|
valueFormatter: null,
|
|
35
34
|
suppressDefaultProperties: true,
|
|
36
35
|
},
|
|
37
|
-
dateString
|
|
38
|
-
baseDataType: 'dateString',
|
|
39
|
-
extendsDataType: 'dateString',
|
|
40
|
-
valueParser: null,
|
|
41
|
-
valueFormatter: null,
|
|
42
|
-
suppressDefaultProperties: true,
|
|
43
|
-
},
|
|
36
|
+
// dateString is force-cast to date in AdapTable, see #data_type_dateString
|
|
44
37
|
// text: is kept as is
|
|
45
38
|
// boolean: is kept as is
|
|
46
39
|
// object: is kept as is
|
|
@@ -16,6 +16,7 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
|
|
|
16
16
|
searchable?: false | 'inline' | 'menulist';
|
|
17
17
|
resizable?: boolean;
|
|
18
18
|
isClearable?: boolean;
|
|
19
|
+
skipDefaultFiltering?: boolean;
|
|
19
20
|
closeMenuOnSelect?: boolean;
|
|
20
21
|
hideSelectedOptions?: boolean;
|
|
21
22
|
showHeaderSelectionCheckbox?: boolean;
|
|
@@ -144,6 +144,7 @@ const Select = function (props) {
|
|
|
144
144
|
const renderMultipleValues = props.renderMultipleValues;
|
|
145
145
|
const isMulti = props.isMulti ?? Array.isArray(props.value);
|
|
146
146
|
const showHeaderSelectionCheckbox = isMulti && (props.showHeaderSelectionCheckbox ?? false);
|
|
147
|
+
const skipDefaultFiltering = props.skipDefaultFiltering ?? false;
|
|
147
148
|
let selectedOption = null;
|
|
148
149
|
if (isMulti) {
|
|
149
150
|
selectedOption =
|
|
@@ -198,7 +199,7 @@ const Select = function (props) {
|
|
|
198
199
|
},
|
|
199
200
|
} }));
|
|
200
201
|
};
|
|
201
|
-
}, []);
|
|
202
|
+
}, [isSelectMenuOpen]);
|
|
202
203
|
const resizable = props.resizable ?? false;
|
|
203
204
|
const ValueContainer = React.useMemo(() => {
|
|
204
205
|
return (props) => {
|
|
@@ -293,7 +294,7 @@ const Select = function (props) {
|
|
|
293
294
|
const MenuList = React.useMemo(() => {
|
|
294
295
|
return (props) => {
|
|
295
296
|
const { setValue, getValue, focusedOption, options, selectProps } = props;
|
|
296
|
-
const { filterOption, inputValue,
|
|
297
|
+
const { filterOption, inputValue, isLoading } = selectProps;
|
|
297
298
|
// Focus the input when MenuList mounts
|
|
298
299
|
React.useEffect(() => {
|
|
299
300
|
if (menulistInputRef.current) {
|
|
@@ -301,7 +302,7 @@ const Select = function (props) {
|
|
|
301
302
|
}
|
|
302
303
|
}, []);
|
|
303
304
|
const filterFunction = React.useCallback(({ data }) => filterOption({ data, label: `${data.label}`, value: data.value }, inputValue), [filterOption, inputValue]);
|
|
304
|
-
const hasFilter = inputValue !== '';
|
|
305
|
+
const hasFilter = inputValue !== '' && !skipDefaultFiltering;
|
|
305
306
|
const filteredOptionsValues = new Set();
|
|
306
307
|
const filteredOptions = !hasFilter
|
|
307
308
|
? options
|
|
@@ -458,7 +459,7 @@ const Select = function (props) {
|
|
|
458
459
|
}, placeholder: "Search..." }))),
|
|
459
460
|
React.createElement(infinite_react_1.InfiniteTable, { header: isMulti && showHeaderSelectionCheckbox ? true : false, rowClassName: rowClassName, showZebraRows: false, rowHeight: '--ab-grid-row-height', onCellClick: isLoading ? null : onCellClick, keyboardNavigation: isLoading ? false : 'row', activeRowIndex: focusedOptionIndex, keyboardSelection: true, columns: isMulti ? INFINITE_COLUMNS_WITH_CHECKBOX : INFINITE_COLUMNS_WITH_RADIO, domProps: INFINITE_DOM_PROPS })));
|
|
460
461
|
};
|
|
461
|
-
}, [isMulti, showHeaderSelectionCheckbox]);
|
|
462
|
+
}, [isMulti, skipDefaultFiltering, showHeaderSelectionCheckbox]);
|
|
462
463
|
const DropdownIndicator = React.useMemo(() => {
|
|
463
464
|
return (dropdownIndicatorProps) => {
|
|
464
465
|
return (React.createElement(react_select_1.components.DropdownIndicator, { ...dropdownIndicatorProps, innerProps: {
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "21.0.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1757076059447 || Date.now(),
|
|
6
|
+
VERSION: "21.0.0-canary.3" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -2408,6 +2408,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2408
2408
|
ref?: undefined;
|
|
2409
2409
|
})[];
|
|
2410
2410
|
};
|
|
2411
|
+
CustomEditColumnValueInfo: {
|
|
2412
|
+
name: string;
|
|
2413
|
+
kind: string;
|
|
2414
|
+
desc: string;
|
|
2415
|
+
};
|
|
2411
2416
|
CustomEditColumnValuesContext: {
|
|
2412
2417
|
name: string;
|
|
2413
2418
|
kind: string;
|
|
@@ -3024,6 +3029,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3024
3029
|
name: string;
|
|
3025
3030
|
kind: string;
|
|
3026
3031
|
desc: string;
|
|
3032
|
+
props: {
|
|
3033
|
+
name: string;
|
|
3034
|
+
kind: string;
|
|
3035
|
+
desc: string;
|
|
3036
|
+
}[];
|
|
3027
3037
|
};
|
|
3028
3038
|
DefaultPivotLayoutProperties: {
|
|
3029
3039
|
name: string;
|
|
@@ -3067,6 +3077,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3067
3077
|
ref: string;
|
|
3068
3078
|
})[];
|
|
3069
3079
|
};
|
|
3080
|
+
EditColumnValueInfo: {
|
|
3081
|
+
name: string;
|
|
3082
|
+
kind: string;
|
|
3083
|
+
desc: string;
|
|
3084
|
+
};
|
|
3070
3085
|
EditOptions: {
|
|
3071
3086
|
name: string;
|
|
3072
3087
|
kind: string;
|