@adaptabletools/adaptable 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.esm.tsbuildinfo +1 -1
|
@@ -22,9 +22,7 @@ export const PermittedValuesSelector = function (props) {
|
|
|
22
22
|
(async () => {
|
|
23
23
|
let searchValueUsedInFilterValue = false;
|
|
24
24
|
const currentSearchValue = searchFilterRef.current;
|
|
25
|
-
const
|
|
26
|
-
// we are here ALWAYS getting Filter values but sometimes we want to get other things!!!
|
|
27
|
-
props.loadValues
|
|
25
|
+
const p = props.loadValues
|
|
28
26
|
? props.loadValues({
|
|
29
27
|
get currentSearchValue() {
|
|
30
28
|
searchValueUsedInFilterValue = true;
|
|
@@ -37,12 +35,15 @@ export const PermittedValuesSelector = function (props) {
|
|
|
37
35
|
searchValueUsedInFilterValue = true;
|
|
38
36
|
return currentSearchValue;
|
|
39
37
|
},
|
|
40
|
-
})
|
|
38
|
+
});
|
|
39
|
+
const distinctColumnValues = await runIfNotResolvedIn(
|
|
40
|
+
// we are here ALWAYS getting Filter values but sometimes we want to get other things!!!
|
|
41
|
+
p, () => {
|
|
41
42
|
setIsLoading(true);
|
|
42
43
|
});
|
|
43
44
|
setSearchValueWasUsedWhenFiltering(searchValueUsedInFilterValue);
|
|
44
45
|
setIsLoading(false);
|
|
45
|
-
setOptions(distinctColumnValues);
|
|
46
|
+
setOptions(Array.isArray(distinctColumnValues) ? distinctColumnValues : distinctColumnValues.values);
|
|
46
47
|
})();
|
|
47
48
|
}, [props.columnId, props.loadValues, refetchKey]);
|
|
48
49
|
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;
|
|
@@ -428,7 +428,6 @@ export class AdaptableAgGrid {
|
|
|
428
428
|
this.lifecycleState = 'available';
|
|
429
429
|
this.api.themeApi.applyCurrentTheme();
|
|
430
430
|
this.validatePrimaryKey();
|
|
431
|
-
// TODO AFL MIG: we could just patch the defautl Layout on init? instead
|
|
432
431
|
this.checkShouldClearExistingFiltersOrSearches();
|
|
433
432
|
// FIXME AFL FILTER: talk with Radu: should ColumnFilters still be ignored?!
|
|
434
433
|
// see layoutModel.Ignore_ColumnFilters
|
|
@@ -1853,7 +1852,7 @@ You need to define at least one Layout!`);
|
|
|
1853
1852
|
if (dataType === 'boolean') {
|
|
1854
1853
|
return typeof rawValue !== 'boolean' ? Boolean(rawValue) : rawValue;
|
|
1855
1854
|
}
|
|
1856
|
-
if (dataType === 'date'
|
|
1855
|
+
if (dataType === 'date') {
|
|
1857
1856
|
return rawValue instanceof Date ? rawValue : parseDateValue(rawValue);
|
|
1858
1857
|
}
|
|
1859
1858
|
return rawValue;
|
|
@@ -2254,10 +2253,19 @@ You need to define at least one Layout!`);
|
|
|
2254
2253
|
return this.getDistinctGridCellsForColumn(column);
|
|
2255
2254
|
}
|
|
2256
2255
|
async getDistinctFilterValuesForColumn(options) {
|
|
2257
|
-
const { column } = options;
|
|
2256
|
+
const { column, previousResult } = options;
|
|
2258
2257
|
const self = this;
|
|
2259
2258
|
// First get the Grid Cells in the Column
|
|
2260
|
-
|
|
2259
|
+
let currentGridCells;
|
|
2260
|
+
const getCurrentGridCells = () => {
|
|
2261
|
+
// we do this in a function so it's lazy
|
|
2262
|
+
// but we also store in the outside closure, so we can reuse the value if
|
|
2263
|
+
// already called
|
|
2264
|
+
if (currentGridCells) {
|
|
2265
|
+
return currentGridCells;
|
|
2266
|
+
}
|
|
2267
|
+
return (currentGridCells = this.getDistinctGridCellsForColumn(column));
|
|
2268
|
+
};
|
|
2261
2269
|
// If there are custom distinct value, return them; otherwise return the Grids Cells just retrieved
|
|
2262
2270
|
const customInFilterValues = this.adaptableOptions.filterOptions.customInFilterValues;
|
|
2263
2271
|
if (customInFilterValues) {
|
|
@@ -2265,12 +2273,13 @@ You need to define at least one Layout!`);
|
|
|
2265
2273
|
const customInFilterValuesContext = {
|
|
2266
2274
|
...this.api.internalApi.buildBaseContext(),
|
|
2267
2275
|
column,
|
|
2276
|
+
previousFilterResult: previousResult,
|
|
2268
2277
|
get currentSearchValue() {
|
|
2269
2278
|
return options.currentSearchValue;
|
|
2270
2279
|
},
|
|
2271
2280
|
get sortedValues() {
|
|
2272
2281
|
const result = gridApiInternal
|
|
2273
|
-
.sortDistinctValues(
|
|
2282
|
+
.sortDistinctValues(getCurrentGridCells(), column)
|
|
2274
2283
|
.map((gridCell) => {
|
|
2275
2284
|
return {
|
|
2276
2285
|
label: gridCell.displayValue,
|
|
@@ -2289,7 +2298,7 @@ You need to define at least one Layout!`);
|
|
|
2289
2298
|
return result;
|
|
2290
2299
|
},
|
|
2291
2300
|
get defaultValues() {
|
|
2292
|
-
const result =
|
|
2301
|
+
const result = getCurrentGridCells().map((gridCell) => {
|
|
2293
2302
|
return {
|
|
2294
2303
|
label: gridCell.displayValue,
|
|
2295
2304
|
value: gridCell.rawValue,
|
|
@@ -2327,23 +2336,24 @@ You need to define at least one Layout!`);
|
|
|
2327
2336
|
return result;
|
|
2328
2337
|
},
|
|
2329
2338
|
};
|
|
2330
|
-
let
|
|
2339
|
+
let customInFilterValuesResult;
|
|
2331
2340
|
try {
|
|
2332
|
-
|
|
2341
|
+
customInFilterValuesResult = await customInFilterValues(customInFilterValuesContext);
|
|
2333
2342
|
}
|
|
2334
2343
|
catch (error) {
|
|
2335
2344
|
this.logger.consoleError(`Failed to fetch custom filter values`, column, error);
|
|
2336
2345
|
}
|
|
2337
|
-
return
|
|
2346
|
+
return customInFilterValuesResult;
|
|
2338
2347
|
}
|
|
2339
2348
|
// No distinct values so lets return unique grid cells
|
|
2340
|
-
|
|
2349
|
+
const values = getCurrentGridCells().map((gridCell) => {
|
|
2341
2350
|
const inFilterValue = {
|
|
2342
2351
|
value: gridCell.rawValue,
|
|
2343
2352
|
label: gridCell.displayValue,
|
|
2344
2353
|
};
|
|
2345
2354
|
return inFilterValue;
|
|
2346
2355
|
});
|
|
2356
|
+
return { values };
|
|
2347
2357
|
}
|
|
2348
2358
|
async getDistinctEditValuesForColumn(options) {
|
|
2349
2359
|
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
|
}
|
|
@@ -27,35 +27,62 @@ export class AdaptableFilterHandler {
|
|
|
27
27
|
return false;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
getCachedFilterDisplayValues() {
|
|
31
|
+
return this.filterDisplayValuesResult;
|
|
32
|
+
}
|
|
33
|
+
getLastCachedFilterDisplayValues() {
|
|
34
|
+
return this.filterDisplayValuesResult ?? this.previousFilterDisplayValuesResult;
|
|
35
|
+
}
|
|
36
|
+
getFromCacheOrFetchFilterDisplayValues(options) {
|
|
37
|
+
if (this.filterDisplayValuesResult) {
|
|
38
|
+
return Promise.resolve(this.filterDisplayValuesResult);
|
|
37
39
|
}
|
|
38
|
-
return this.
|
|
40
|
+
return this.fetchFilterDisplayValues(options);
|
|
41
|
+
}
|
|
42
|
+
fetchFilterDisplayValues(options) {
|
|
43
|
+
return this.adaptableApi.gridApi.internalApi
|
|
44
|
+
.getDistinctFilterDisplayValuesForColumn({
|
|
45
|
+
columnId: this.colId,
|
|
46
|
+
get currentSearchValue() {
|
|
47
|
+
return options.currentSearchValue;
|
|
48
|
+
},
|
|
49
|
+
previousResult: this.filterDisplayValuesResult,
|
|
50
|
+
})
|
|
51
|
+
.then((result) => {
|
|
52
|
+
this.filterDisplayValuesResult = result;
|
|
53
|
+
return result;
|
|
54
|
+
});
|
|
39
55
|
}
|
|
40
56
|
onNewRowsLoaded() {
|
|
41
57
|
this.resetFilterDisplayValues();
|
|
42
58
|
}
|
|
43
59
|
onAnyFilterChanged() {
|
|
60
|
+
const filterOptions = this.adaptableApi.optionsApi.getFilterOptions();
|
|
61
|
+
if (!filterOptions.customInFilterValues) {
|
|
62
|
+
// no-one is using value.count or value.visible
|
|
63
|
+
// or context.sortedValues
|
|
64
|
+
// so no need to reset the filter display values
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
44
67
|
this.resetFilterDisplayValues();
|
|
45
68
|
}
|
|
46
69
|
resetFilterDisplayValues() {
|
|
70
|
+
if (this.filterDisplayValuesResult) {
|
|
71
|
+
this.previousFilterDisplayValuesResult = this.filterDisplayValuesResult;
|
|
72
|
+
}
|
|
47
73
|
// Reset the filter display values manually
|
|
48
|
-
this.
|
|
74
|
+
this.filterDisplayValuesResult = undefined;
|
|
49
75
|
}
|
|
50
76
|
async refreshFilterDisplayValues() {
|
|
51
77
|
this.resetFilterDisplayValues();
|
|
52
|
-
return this.
|
|
78
|
+
return this.getFromCacheOrFetchFilterDisplayValues({ currentSearchValue: '' });
|
|
53
79
|
}
|
|
54
80
|
refresh(params) {
|
|
55
81
|
// No specific refresh logic needed for this handler
|
|
56
82
|
// The filter display values will be reset on new rows loaded or any filter changed
|
|
57
83
|
}
|
|
58
84
|
destroy() {
|
|
59
|
-
this.
|
|
85
|
+
this.filterDisplayValuesResult = undefined;
|
|
86
|
+
this.previousFilterDisplayValuesResult = undefined;
|
|
60
87
|
}
|
|
61
88
|
}
|
|
@@ -20,7 +20,7 @@ export function getEditorForColumnDataType(columnDataType, variant) {
|
|
|
20
20
|
if (columnDataType === 'number') {
|
|
21
21
|
return variant === 'react' ? AdaptableReactNumberEditor : AdaptableNumberEditor;
|
|
22
22
|
}
|
|
23
|
-
if (columnDataType === 'date'
|
|
23
|
+
if (columnDataType === 'date') {
|
|
24
24
|
return variant === 'react' ? AdaptableReactDateEditor : AdaptableDateEditor;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -506,7 +506,10 @@ export class AgGridColumnAdapter {
|
|
|
506
506
|
: Array.isArray(original_columnType)
|
|
507
507
|
? original_columnType
|
|
508
508
|
: [original_columnType];
|
|
509
|
-
|
|
509
|
+
// Adaptable uses type 'date' for all date columns, while AG Grid uses 'date' and 'dateString'
|
|
510
|
+
// #data_type_dateString
|
|
511
|
+
let normalisedTypes = originalTypes.map((t) => (t === 'dateString' ? 'date' : t));
|
|
512
|
+
const columnTypes = new Set(normalisedTypes);
|
|
510
513
|
if (this.adaptableApi.columnApi.isCalculatedColumn(colId)) {
|
|
511
514
|
columnTypes.add(CALCULATED_COLUMN_TYPE);
|
|
512
515
|
}
|
|
@@ -431,7 +431,7 @@ export class AgGridExportAdapter {
|
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
433
|
const columnDataType = this.adaptableApi.columnApi.getColumnDataTypeForColumnId(columnId);
|
|
434
|
-
if (
|
|
434
|
+
if (columnDataType === 'date' &&
|
|
435
435
|
typeof rawValue === 'string' &&
|
|
436
436
|
// rawValue is composed only of digits
|
|
437
437
|
/^\d+$/.test(rawValue)) {
|
|
@@ -689,7 +689,6 @@ export class AgGridExportAdapter {
|
|
|
689
689
|
case 'boolean':
|
|
690
690
|
return 'Boolean';
|
|
691
691
|
case 'date':
|
|
692
|
-
case 'dateString':
|
|
693
692
|
return 'DateTime';
|
|
694
693
|
case 'text':
|
|
695
694
|
default:
|
|
@@ -819,7 +818,7 @@ export class AgGridExportAdapter {
|
|
|
819
818
|
if (exportContext.isVisualExcelReport) {
|
|
820
819
|
return this.getCellExportValueFromRawValueByType(rowNode, cellRawValue, columnId, 'formattedValue');
|
|
821
820
|
}
|
|
822
|
-
const isDateColumn = columnDataType === 'date'
|
|
821
|
+
const isDateColumn = columnDataType === 'date';
|
|
823
822
|
// 2. if this is a date column and there is a custom export date format provided, that will next take precedence
|
|
824
823
|
if (isDateColumn) {
|
|
825
824
|
const customExportDateFormat = this.getCustomExportDateFormat(column, exportContext);
|
|
@@ -877,7 +876,6 @@ export class AgGridExportAdapter {
|
|
|
877
876
|
case 'number':
|
|
878
877
|
return dataFormatDataType.number;
|
|
879
878
|
case 'date':
|
|
880
|
-
case 'dateString':
|
|
881
879
|
return dataFormatDataType.date;
|
|
882
880
|
default:
|
|
883
881
|
// default to rawValue for all other column types
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AdaptableLogger } from '.';
|
|
1
2
|
import { AllEnterpriseModule } from 'ag-grid-enterprise';
|
|
2
3
|
export const AG_GRID_VERSION = AllEnterpriseModule.version;
|
|
3
4
|
export class AgGridModulesAdapter {
|
|
@@ -42,7 +43,10 @@ export class AgGridModulesAdapter {
|
|
|
42
43
|
mandatoryModules.push('ServerSideRowModelApiModule');
|
|
43
44
|
break;
|
|
44
45
|
case 'infinite':
|
|
45
|
-
|
|
46
|
+
AdaptableLogger.consoleErrorBase("AdapTable does not support AG Grid's Infinite Row Model");
|
|
47
|
+
break;
|
|
48
|
+
case 'viewport':
|
|
49
|
+
mandatoryModules.push('ViewportRowModelModule');
|
|
46
50
|
break;
|
|
47
51
|
default:
|
|
48
52
|
mandatoryModules.push('ClientSideRowModelModule');
|
|
@@ -7,7 +7,6 @@ export const ALL_ADAPTABLE_DATA_TYPES = [
|
|
|
7
7
|
'number',
|
|
8
8
|
'boolean',
|
|
9
9
|
'date',
|
|
10
|
-
'dateString',
|
|
11
10
|
'object',
|
|
12
11
|
TEXT_ARRAY_DATA_TYPE,
|
|
13
12
|
NUMBER_ARRAY_DATA_TYPE,
|
|
@@ -31,13 +30,7 @@ export const agGridDataTypeDefinitions = {
|
|
|
31
30
|
valueFormatter: null,
|
|
32
31
|
suppressDefaultProperties: true,
|
|
33
32
|
},
|
|
34
|
-
dateString
|
|
35
|
-
baseDataType: 'dateString',
|
|
36
|
-
extendsDataType: 'dateString',
|
|
37
|
-
valueParser: null,
|
|
38
|
-
valueFormatter: null,
|
|
39
|
-
suppressDefaultProperties: true,
|
|
40
|
-
},
|
|
33
|
+
// dateString is force-cast to date in AdapTable, see #data_type_dateString
|
|
41
34
|
// text: is kept as is
|
|
42
35
|
// boolean: is kept as is
|
|
43
36
|
// 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;
|
|
@@ -140,6 +140,7 @@ export const Select = function (props) {
|
|
|
140
140
|
const renderMultipleValues = props.renderMultipleValues;
|
|
141
141
|
const isMulti = props.isMulti ?? Array.isArray(props.value);
|
|
142
142
|
const showHeaderSelectionCheckbox = isMulti && (props.showHeaderSelectionCheckbox ?? false);
|
|
143
|
+
const skipDefaultFiltering = props.skipDefaultFiltering ?? false;
|
|
143
144
|
let selectedOption = null;
|
|
144
145
|
if (isMulti) {
|
|
145
146
|
selectedOption =
|
|
@@ -194,7 +195,7 @@ export const Select = function (props) {
|
|
|
194
195
|
},
|
|
195
196
|
} }));
|
|
196
197
|
};
|
|
197
|
-
}, []);
|
|
198
|
+
}, [isSelectMenuOpen]);
|
|
198
199
|
const resizable = props.resizable ?? false;
|
|
199
200
|
const ValueContainer = React.useMemo(() => {
|
|
200
201
|
return (props) => {
|
|
@@ -289,7 +290,7 @@ export const Select = function (props) {
|
|
|
289
290
|
const MenuList = React.useMemo(() => {
|
|
290
291
|
return (props) => {
|
|
291
292
|
const { setValue, getValue, focusedOption, options, selectProps } = props;
|
|
292
|
-
const { filterOption, inputValue,
|
|
293
|
+
const { filterOption, inputValue, isLoading } = selectProps;
|
|
293
294
|
// Focus the input when MenuList mounts
|
|
294
295
|
React.useEffect(() => {
|
|
295
296
|
if (menulistInputRef.current) {
|
|
@@ -297,7 +298,7 @@ export const Select = function (props) {
|
|
|
297
298
|
}
|
|
298
299
|
}, []);
|
|
299
300
|
const filterFunction = React.useCallback(({ data }) => filterOption({ data, label: `${data.label}`, value: data.value }, inputValue), [filterOption, inputValue]);
|
|
300
|
-
const hasFilter = inputValue !== '';
|
|
301
|
+
const hasFilter = inputValue !== '' && !skipDefaultFiltering;
|
|
301
302
|
const filteredOptionsValues = new Set();
|
|
302
303
|
const filteredOptions = !hasFilter
|
|
303
304
|
? options
|
|
@@ -454,7 +455,7 @@ export const Select = function (props) {
|
|
|
454
455
|
}, placeholder: "Search..." }))),
|
|
455
456
|
React.createElement(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 })));
|
|
456
457
|
};
|
|
457
|
-
}, [isMulti, showHeaderSelectionCheckbox]);
|
|
458
|
+
}, [isMulti, skipDefaultFiltering, showHeaderSelectionCheckbox]);
|
|
458
459
|
const DropdownIndicator = React.useMemo(() => {
|
|
459
460
|
return (dropdownIndicatorProps) => {
|
|
460
461
|
return (React.createElement(components.DropdownIndicator, { ...dropdownIndicatorProps, innerProps: {
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
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" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "21.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1757076026384 || Date.now(),
|
|
4
|
+
VERSION: "21.0.0-canary.3" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -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;
|