Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: pure SVG icons, Moment to Tempo, Flatpickr to Vanilla-Calendar #1518

Merged
merged 61 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
70cda8a
feat(styling)!: convert SVG icons to pure CSS (#1474)
ghiscoding Apr 26, 2024
12661a3
feat(styling)!: remove SASS `math.div` polyfill (#1483)
ghiscoding Apr 27, 2024
fb6e950
feat(common)!: migrate from Flatpickr to Vanilla-Calendar (#1466)
ghiscoding Apr 27, 2024
2de3fe2
feat(styling)!: delete `checkmarkFormatter` and any Font-Awesome rela…
ghiscoding Apr 27, 2024
fae4c4a
feat(filters)!: remove native `Filters.select` (#1485)
ghiscoding Apr 27, 2024
afe65b2
chore: remove any reference to internalColumnEditor (#1486)
ghiscoding Apr 27, 2024
4ac34ee
fix(editor): new Date Editor input clear button wasn't working (#1487)
ghiscoding Apr 27, 2024
3c22b3e
chore: don't re-export ms-select interface (#1488)
ghiscoding Apr 27, 2024
dce7c44
chore: remove any deprecated code leftover (#1489)
ghiscoding Apr 27, 2024
90690f4
feat(common)!: migrate from `moment` to `moment-tiny` (#1456)
ghiscoding Apr 28, 2024
d2cc940
chore(styling): add CSS variable for .slick-cell optional flex (#1490)
ghiscoding Apr 28, 2024
69f7bfc
fix(styling): Row Move icon shouldn't show extra dot
ghiscoding-SE Apr 29, 2024
240cbd3
fix(styling): empty warning should separate icon & text (#1491)
ghiscoding Apr 29, 2024
75dce74
fix(styling): properly import Vanilla-Calendar CSS and only once (#1492)
ghiscoding Apr 29, 2024
ca5ac06
feat(styling)!: delete "bare" Themes but keep "lite" & add to Bootstr…
ghiscoding Apr 30, 2024
3e549c7
docs: add `internalColumnEditor` removal to migration guide
ghiscoding-SE Apr 30, 2024
4c63bcd
docs: improve migration docs
ghiscoding-SE Apr 30, 2024
dcc693b
fix(tooltip): don't sanitize empty text, fixes empty tooltip being sh…
ghiscoding May 1, 2024
dcc1743
chore: revisit all buttons with icon styling (#1494)
ghiscoding May 1, 2024
2188242
fix(styling): couple of small alignment issues when using flex (#1496)
ghiscoding May 1, 2024
7a78106
chore: revisit all buttons with icon styling
ghiscoding-SE May 1, 2024
f9d8026
chore: add book mdi icon
ghiscoding-SE May 1, 2024
ccd344e
fix(editor): input editor should call save on focusout or blur of inp…
ghiscoding May 1, 2024
473eb4b
chore: update moment-tiny to hopefully fix ESM on Angular (#1498)
ghiscoding May 1, 2024
4c2de70
chore: small button-style adjustment for Salesforce UI
ghiscoding-SE May 1, 2024
4ee5e6e
Merge branch 'next' of https://github.com/ghiscoding/slickgrid-univer…
ghiscoding-SE May 1, 2024
f70b0e4
chore: add back re-export of MultipleSelectOption
ghiscoding-SE May 1, 2024
a7e6a5a
chore: fix some styling issues found in upstream libs (#1499)
ghiscoding May 2, 2024
bb19008
chore(deps): update to latest ms-select with styling fixes
ghiscoding May 2, 2024
8de1340
fix(editor): autocomplete should only save empty when val is null (#1…
ghiscoding May 2, 2024
3649484
docs: improve composite docs
ghiscoding May 2, 2024
e82d092
chore(style): merge slick-grid.scss & slick-bootstrap.scss into 1 fil…
ghiscoding May 3, 2024
0aa0859
feat(common)!: make DOMPurify as optional sanitizer grid option (#1503)
ghiscoding May 3, 2024
a74cdd8
chore(style): add back deleted SF font-size base
ghiscoding-SE May 3, 2024
502551c
docs: improve dompurify notes for migration & CSP
ghiscoding-SE May 3, 2024
bf732bc
chore(deps): merge master branch into next (#1504)
ghiscoding May 3, 2024
adef47f
feat!: migrate from Moment to Tempo (#1507)
ghiscoding May 6, 2024
6f0dca3
docs: improve migration docs & add getting started install for universal
ghiscoding-SE May 6, 2024
e85bbc8
docs: improve migration docs
ghiscoding-SE May 6, 2024
8bf1d5a
docs: improve migration docs
ghiscoding-SE May 6, 2024
9c48e93
chore: add conventional-changelogcommits for major versions
ghiscoding May 7, 2024
a484319
chore: add lerna major beta release script
ghiscoding May 7, 2024
821e9e3
chore(release): publish new version 5.0.0-beta.2
ghiscoding May 7, 2024
6958282
docs: cleanup changelog
ghiscoding May 7, 2024
7fafbcc
fix: make some more cleanup with now optional DOMPurify (#1508)
ghiscoding May 7, 2024
2ef562d
chore: remove unused CSS class
ghiscoding-SE May 7, 2024
94b836a
fix(core): tweak setupColumnSort() to fix exception with hidden col (…
ghiscoding May 7, 2024
a4ef70f
fix(styling): improve UI & fix small issues found after testing upstr…
ghiscoding May 7, 2024
2ff15da
fix(tooltip): only show tooltip that has value (#1511)
ghiscoding May 7, 2024
e37bb28
fix(common): Select Editor should always close with Escape key (#1512)
ghiscoding May 7, 2024
3d765a9
fix(editors): body click or Escape key should cancel Select Editor (#…
ghiscoding May 8, 2024
9c1afd4
chore(demo): add Dark Mode to Trading demo (#1514)
ghiscoding May 8, 2024
383792d
fix(plugins): clicking a grid cell should close any open menu (#1515)
ghiscoding May 8, 2024
893572a
chore(styling): simply and cleanup SASS code for icons/text utils
ghiscoding-SE May 8, 2024
46f3747
chore(styling): simply and cleanup SASS code for icons/text utils
ghiscoding-SE May 8, 2024
56a4f53
docs: add gzip build size badge
ghiscoding-SE May 8, 2024
ba68019
chore: use node-`extend()` from within `deepCopy` (#1516)
ghiscoding May 8, 2024
e3a70b8
fix(common): consider target size when auto-position picker/modal (#1…
ghiscoding May 9, 2024
26cd69e
chore(release): publish new version 5.0.0-beta.3
ghiscoding May 9, 2024
600fae7
docs: add info about build size with bundlephobia
ghiscoding May 9, 2024
6290af0
Merge branch 'master' into next
ghiscoding May 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"javascript",
"typescript"
],
"typescript.format.semicolons": "insert"
"typescript.format.semicolons": "insert",
"typescript.tsdk": "node_modules\\typescript\\lib"
}
569 changes: 569 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

* [Quick start](getting-started/quick-start.md)
* [Salesforce (LWC)](getting-started/installation-salesforce.md)
* [Vanilla Installation](getting-started/installation-vanilla.md)

## Styling

Expand All @@ -18,6 +19,7 @@
* [Editors](column-functionalities/Editors.md)
* [new Autocomplete (Kraaden-lib)](column-functionalities/editors/Autocomplete-Editor-(Kraaden-lib).md)
* [Date Picker (flatpickr)](column-functionalities/editors/Date-Editor-(flatpickr).md)
* [Date Picker (vanilla-calendar)](column-functionalities/editors/date-editor-(vanilla-calendar).md)
* [LongText (textarea)](column-functionalities/editors/LongText-Editor-(textarea).md)
* [Select Dropdown Editor (single/multiple)](column-functionalities/editors/Select-Dropdown-Editor-(single,multiple).md)
* [Filters](column-functionalities/filters/README.md)
Expand Down Expand Up @@ -76,3 +78,4 @@
* [Migration Guide to 2.x](migrations/migration-to-2.x.md)
* [Migration Guide to 3.x](migrations/migration-to-3.x.md)
* [Migration Guide to 4.x](migrations/migration-to-4.x.md)
* [Migration Guide to 5.x](migrations/migration-to-5.x.md)
46 changes: 22 additions & 24 deletions docs/column-functionalities/Cell-Menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ this.columnDefinitions = [
console.log(args.dataContext, args.column); // action callback.. do something
}
},
{ command: 'help', title: 'HELP', iconCssClass: 'fa fa-question-circle', positionOrder: 62 },
{ command: 'help', title: 'HELP', iconCssClass: 'mdi mdi-help-circle', positionOrder: 62 },
// you can add sub-menus by adding nested `commandItems`
{
// we can also have multiple nested sub-menus
Expand Down Expand Up @@ -74,8 +74,8 @@ this.columnDefinitions = [
cellMenu: {
optionTitle: 'Change Effort Driven Flag', // optional, add title
optionItems: [
{ option: true, title: 'True', iconCssClass: 'fa fa-check-square-o' },
{ option: false, title: 'False', iconCssClass: 'fa fa-square-o' },
{ option: true, title: 'True', iconCssClass: 'mdi mdi-check-box-outline' },
{ option: false, title: 'False', iconCssClass: 'mdi mdi-checkbox-blank-outline' },
{ divider: true, command: '', positionOrder: 60 },
],
// subscribe to Context Menu onOptionSelected event (or use the "action" callback on each option)
Expand Down Expand Up @@ -153,7 +153,7 @@ this.columnDefinitions = [
{ id: 'action', field: 'action', name: 'Action',
cellMenu: {
menuUsabilityOverride: (args) => {
const dataContext = args && args.dataContext;
const dataContext = args?.dataContext;
return (dataContext.id < 21); // say we want to display the menu only from Task 0 to 20
},
}
Expand All @@ -163,24 +163,22 @@ this.columnDefinitions = [

To give another example, with Options this time, we could say that we enable the `n/a` option only when the row is Completed. So we could do it this way
```ts
this.columnDefinitions = [
{ id: 'action', field: 'action', name: 'Action',
cellMenu: {
optionItems: [
{
option: 0, title: 'n/a', textCssClass: 'italic',
// only enable this option when the task is Not Completed
itemUsabilityOverride: (args) => {
const dataContext = args && args.dataContext;
return !dataContext.completed;
},
{ option: 1, iconCssClass: 'fa fa-star-o yellow', title: 'Low' },
{ option: 2, iconCssClass: 'fa fa-star-half-o orange', title: 'Medium' },
{ option: 3, iconCssClass: 'fa fa-star red', title: 'High' },
]
}
this.columnDefinitions = [{
id: 'action', field: 'action', name: 'Action',
cellMenu: {
optionItems: [{
option: 0, title: 'n/a', textCssClass: 'italic',
// only enable this option when the task is Not Completed
itemUsabilityOverride: (args) => {
const dataContext = args?.dataContext;
return !dataContext.completed;
},
{ option: 1, iconCssClass: 'mdi mdi-star-outline yellow', title: 'Low' },
{ option: 2, iconCssClass: 'mdi mdi-star orange', title: 'Medium' },
{ option: 3, iconCssClass: 'mdi mdi-star red', title: 'High' },
}]
}
];
}];
```

### How to add Translations?
Expand All @@ -191,9 +189,9 @@ this.columnDefinitions = [
cellMenu: {
optionTitleKey: 'COMMANDS', // optionally pass a title to show over the Options
optionItems: [
{ option: 1, titleKey: 'LOW', iconCssClass: 'fa fa-star-o yellow' },
{ option: 2, titleKey: 'MEDIUM', iconCssClass: 'fa fa-star-half-o orange' },
{ option: 3, titleKey: 'HIGH', iconCssClass: 'fa fa-star red' },
{ option: 1, titleKey: 'LOW', iconCssClass: 'mdi mdi-star-outline yellow' },
{ option: 2, titleKey: 'MEDIUM', iconCssClass: 'mdi mdi-star orange' },
{ option: 3, titleKey: 'HIGH', iconCssClass: 'mdi mdi-star red' },
]
}
}
Expand Down
12 changes: 6 additions & 6 deletions docs/column-functionalities/Editors.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ this.columnDefinitions = [
];
```

So to make it more clear, the `saveOutputType` is the format that will be sent to the `onCellChange` event, then the `outputType` is how the date will show up in the date picker (Flatpickr) and finally the `type` is basically the input format (coming from your dataset). Note however that each property are cascading, if 1 property is missing it will go to the next one until 1 is found... for example, on the `onCellChange` if you aren't defining `saveOutputType`, it will try to use `outputType`, if again none is provided it will try to use `type` and finally if none is provided it will use `FieldType.dateIso` as the default.
So to make it more clear, the `saveOutputType` is the format that will be sent to the `onCellChange` event, then the `outputType` is how the date will show up in the date picker (Vanilla-Calendar) and finally the `type` is basically the input format (coming from your dataset). Note however that each property are cascading, if 1 property is missing it will go to the next one until 1 is found... for example, on the `onCellChange` if you aren't defining `saveOutputType`, it will try to use `outputType`, if again none is provided it will try to use `type` and finally if none is provided it will use `FieldType.dateIso` as the default.

## Perform an action After Inline Edit
#### Recommended way
Expand Down Expand Up @@ -201,9 +201,9 @@ Some of the Editors could receive extra options, which is mostly the case for Ed
```ts
this.columnDefinitions = [{
id: 'start', name: 'Start Date', field: 'start',
editor: {
editor: {
model: Editors.date,
editorOptions: { minDate: 'today' }
editorOptions: { range: { min: 'today' } } as VanillaCalendarOption
}
}];
```
Expand All @@ -213,10 +213,10 @@ You could also define certain options as a global level (for the entire grid or

```ts
this.gridOptions = {
defaultEditorOptions: {
defaultEditorOptions: {
autocompleter: { debounceWaitMs: 150 }, // typed as AutocompleterOption
date: { minDate: 'today' },
longText: { cols: 50, rows: 5 }
date: { range: { min: 'today' } },
longText: { cols: 50, rows: 5 }
}
}
```
Expand Down
56 changes: 14 additions & 42 deletions docs/column-functionalities/Formatters.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@
### Definition
`Formatters` are functions that can be used to change and format certain column(s) in the grid. Please note that it does not alter the input data, it simply changes the styling by formatting the data differently to the screen (what the user visually see).

A good example of a `Formatter` could be a column name `isActive` which is a `boolean` field with input data as `True` or `False`. User would prefer to simply see a checkbox as a visual indication representing the `True` flag, for this behavior you can use `Formatters.checkmark` which will use [Font-Awesome](http://fontawesome.io/icons/) icon of `fa-check` when `True` or an empty string when `False`.
A good example of a `Formatter` could be a column name `isActive` which is a `boolean` field with input data as `True` or `False`. User would prefer to simply see a checkbox as a visual indication representing the `True` flag, for this behavior you can use `Formatters.checkmarkMaterial` which will use optional SVG icons of `mdi-check` when `True` or an empty string when `False`.

For a [UI sample](#ui-sample), scroll down below.

### Provided Formatters
`Slickgrid-Universal` ships with a few `Formatters` by default which helps with common fields, you can see the [entire list here](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/formatters/index.ts#L37).

> **Note** you might not need a Formatter when a simple CSS style is needed, think about using `cssClass` column property instead.
> **Note** you might not need a Formatter when a simple CSS style and class might be enough, think about using `cssClass` column property as much as possible since it has much better perf.

#### List of provided `Formatters`
- `arrayObjectToCsv`: Takes an array of complex objects converts it to a comma delimited string.
- `arrayToCsv` : takes an array of text and returns it as CSV string
- `checkmark` : uses Font-Awesome [(fa-check)](http://fontawesome.io/icon/check/)
- `checkmarkMaterial` use Material Design to display a checkmark icon
- `collection`: Looks up values from the columnDefinition.params.collection property and displays the label in CSV or string format
- `complexObject`: takes a complex object (with a `field` that has a `.` notation) and pull correct value, there are multiple ways to use it
Expand All @@ -47,6 +46,7 @@ For a [UI sample](#ui-sample), scroll down below.
- `dateTimeUs` : Takes a Date object and displays it as an US Date+Time format (MM/DD/YYYY HH:mm:ss)
- `dateTimeShortUs`: Takes a Date object and displays it as an US Date+Time (without seconds) format (MM/DD/YYYY HH:mm:ss)
- `dateTimeUsAmPm` : Takes a Date object and displays it as an US Date+Time+(am/pm) format (MM/DD/YYYY hh:mm:ss a)
- `dateUtc` : Takes a Date object and displays it as a TZ format (YYYY-MM-DDThh:mm:ssZ)
- `decimal`: Display the value as x decimals formatted, defaults to 2 decimals. You can pass "minDecimal" and/or "maxDecimal" to the "params" property.
- `dollar`: Display the value as 2 decimals formatted with dollar sign '$' at the end of of the value.
- `dollarColored`: Display the value as 2 decimals formatted with dollar sign '$' at the end of of the value, change color of text to red/green on negative/positive value
Expand All @@ -71,10 +71,12 @@ For a [UI sample](#ui-sample), scroll down below.
- `translateBoolean`: Takes a boolean value, cast it to upperCase string and finally translates it (i18n).
- `tree`: Formatter that must be used when the column is a Tree Data column

**Note:** The list might not always be up to date, you can refer to the [Formatters export](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/formatters/index.ts#L37) to know exactly which ones are available.
> **Note:** The list is certainly not up to date (especially for Dates), please refer to the [Formatters export](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/formatters/index.ts#L37) to know exactly which formatters are available.

> **Note** all Date formatters are formatted using [Tempo](https://tempo.formkit.com/#format-tokens). There are also many more Date formats not shown above, simply visit the [formatters.index](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/formatters/formatters.index.ts#L101) to see all available Date/Time formats.

### Usage
To use any of them, you need to import `Formatters` from `Slickgrid-Universal` and add a `formatter: ...` in your column definitions as shown below:
To use any of them, you simply need to import `Formatters` from `Slickgrid-Universal` and add a `formatter: Formatters.xyz` (where `xyx` is the name of the built-in formatter) in your column definitions as shown below:

#### TypeSript
```ts
Expand All @@ -97,39 +99,7 @@ export class Example {
{ id: '%', name: '% Complete', field: 'percentComplete', formatter: Formatters.percentComplete },
{ id: 'start', name: 'Start', field: 'start', formatter: Formatters.dateIso },
{ id: 'finish', name: 'Finish', field: 'finish', formatter: Formatters.dateIso },
{ id: 'effort-driven', name: 'Effort Driven', field: 'effortDriven', formatter: Formatters.checkmark }
];
}
}
```

#### SalesForce (ES6)
For SalesForce the code is nearly the same, the only difference is to add the `Slicker` prefix, so instead of `Formatters.abc` we need to use `Slicker.Formatters.abc`

```ts
// ... SF_Slickgrid import


export class Example {
const Slicker = window.Slicker;

columnDefinitions: Column[];
gridOptions: GridOption;
dataset: any[];

constructor() {
// define the grid options & columns and then create the grid itself
this.defineGrid();
}

defineGrid() {
this.columnDefinitions = [
{ id: 'title', name: 'Title', field: 'title' },
{ id: 'duration', name: 'Duration (days)', field: 'duration' },
{ id: '%', name: '% Complete', field: 'percentComplete', formatter: Slicker.Formatters.percentComplete },
{ id: 'start', name: 'Start', field: 'start', formatter: Slicker.Formatters.dateIso },
{ id: 'finish', name: 'Finish', field: 'finish', formatter: Slicker.Formatters.dateIso },
{ id: 'effort-driven', name: 'Effort Driven', field: 'effortDriven', formatter: Slicker.Formatters.checkmark }
{ id: 'effort-driven', name: 'Effort Driven', field: 'effortDriven', formatter: Formatters.checkmarkMaterial }
];
}
}
Expand Down Expand Up @@ -191,19 +161,21 @@ export interface FormatterResultObject {
```

### Example of a Custom Formatter with HTML string
For example, we will use `Font-Awesome` with a `boolean` as input data, and display a (fire) icon when `True` or a (snowflake) when `False`. This custom formatter is actually display in the [UI sample](#ui-sample) shown below.

For example, we will use our optional SVG icons `.mdi` with a `boolean` as input data, and display a (fire) icon when `True` or a (snowflake) when `False`. This custom formatter is actually display in the [UI sample](#ui-sample) shown below.

```ts
// create a custom Formatter with the Formatter type
const myCustomCheckboxFormatter: Formatter = (row: number, cell: number, value: any, columnDef: Column, dataContext: any) =>
value ? `<i class="fa fa-fire" aria-hidden="true"></i>` : '<i class="fa fa-snowflake-o" aria-hidden="true"></i>';
value ? `<i class="mdi mdi-fire" aria-hidden="true"></i>` : '<i class="mdi mdi-snowflake" aria-hidden="true"></i>';
```

#### Example with `FormatterResultObject` instead of a string
Using this object return type will provide the user the same look and feel, it will actually be quite different. The major difference is that all of the options (`addClasses`, `tooltip`, ...) will be added the CSS container of the cell instead of the content of that container. For example a typically cell looks like the following `<div class="slick-cell l4 r4">Task 4</div>` and if use `addClasses: 'red'`, it will end up being `<div class="slick-cell l4 r4 red">Task 4</div>` while if we use a string output of let say `<span class="red">${value></span>`, then our final result of the cell will be `<div class="slick-cell l4 r4"><span class="red">Task 4</span></div>`. This can be useful if you plan to use multiple Formatters and don't want to lose or overwrite the previous Formatter result (we do that in our project).
```ts
// create a custom Formatter and returning a string and/or an object of type FormatterResultObject
const myCustomCheckboxFormatter: Formatter = (row: number, cell: number, value: any, columnDef: Column, dataContext: any, grid?: any) =>
value ? { addClasses: 'fa fa-fire', text: '', tooltip: 'burning fire' } : '<i class="fa fa-snowflake-o" aria-hidden="true"></i>';
value ? { addClasses: 'mdi mdi-fire', text: '', tooltip: 'burning fire' } : '<i class="mdi mdi-snowflake" aria-hidden="true"></i>';
```

### Example of Custom Formatter with Native DOM Element
Expand All @@ -212,7 +184,7 @@ Since version 4.x, you can now also return native DOM element instead of an HTML
2. Performance (the reasons are similar to point 1.)
- since it's native it can be appended directly to the grid cell
- when it's an HTML string, it has to do 2 extra steps (which is an overhead process)
i. sanitize the string (we use [DOMPurify](https://github.com/cure53/DOMPurify) by default)
i. sanitize the string (when a sanitizer, for example [DOMPurify](https://github.com/cure53/DOMPurify))
ii. SlickGrid then has to convert it to native element by using `innerHTML` on the grid cell

Demo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,6 @@ export class GridBasicComponent {
editorOptions: {
showOnFocus: true,
minLength: 1,
classes: {
// choose a custom style layout
// 'ui-autocomplete': 'autocomplete-custom-two-rows',
'ui-autocomplete': 'autocomplete-custom-four-corners',
},
fetch: (searchText, updateCallback) => {
yourAsyncApiCall(searchText) // typically you'll want to return no more than 10 results
.then(result => updateCallback((results.length > 0) ? results : [{ label: 'No match found.', value: '' }]); })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ You could also define certain options as a global level (for the entire grid or

```ts
this.gridOptions = {
defaultEditorOptions: {
date: { minDate: 'today' }, // typed as FlatpickrOption
defaultEditorOptions: {
date: { range: { min: 'today' } }, // typed as FlatpickrOption
}
}
```
Expand Down
Loading
Loading