Skip to content

Commit

Permalink
chore: replace deprecated Formatters by cssClass (#1122)
Browse files Browse the repository at this point in the history
* chore: replace deprecated Formatters by `cssClass`
  • Loading branch information
ghiscoding authored Dec 8, 2023
1 parent 5965ed4 commit f5df421
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
8 changes: 3 additions & 5 deletions src/examples/slickgrid/example30.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ export class Example30 {
this.columnDefinitions = [
{
id: 'title', name: 'Title', field: 'title', sortable: true, type: FieldType.string, minWidth: 75,
filterable: true, columnGroup: 'Common Factor',
filter: { model: Filters.compoundInputText },
formatter: Formatters.multiple, params: { formatters: [Formatters.uppercase, Formatters.bold] },
cssClass: 'text-uppercase text-bold', columnGroup: 'Common Factor',
filterable: true, filter: { model: Filters.compoundInputText },
editor: {
model: Editors.longText, massUpdate: false, required: true, alwaysSaveOnEnterKey: true,
maxLength: 12,
Expand Down Expand Up @@ -219,8 +218,7 @@ export class Example30 {
{
id: 'completed', name: 'Completed', field: 'completed', width: 80, minWidth: 75, maxWidth: 100,
sortable: true, filterable: true, columnGroup: 'Period',
formatter: Formatters.multiple,
params: { formatters: [Formatters.checkmark, Formatters.center] },
cssClass: 'text-center', formatter: Formatters.checkmark,
exportWithFormatter: false,
filter: {
collection: [{ value: '', label: '' }, { value: true, label: 'True' }, { value: false, label: 'False' }],
Expand Down
12 changes: 6 additions & 6 deletions src/examples/slickgrid/example32.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ export class Example32 {
resizeCharWidthInPx: 7.6,
resizeCalcWidthRatio: 1, // default ratio is ~0.9 for string but since our text is all uppercase then a higher ratio is needed
resizeMaxWidthThreshold: 200,
filterable: true, columnGroup: 'Common Factor',
filter: { model: Filters.compoundInputText },
formatter: Formatters.multiple, params: { formatters: [Formatters.uppercase, Formatters.bold] },
columnGroup: 'Common Factor',
cssClass: 'text-uppercase text-bold',
filterable: true, filter: { model: Filters.compoundInputText },
editor: {
model: Editors.longText, required: true, alwaysSaveOnEnterKey: true,
maxLength: 12,
Expand Down Expand Up @@ -190,10 +190,10 @@ export class Example32 {
},
{
id: 'completed', name: 'Completed', field: 'completed', width: 80, minWidth: 75, maxWidth: 100,
sortable: true, filterable: true, columnGroup: 'Period',
formatter: Formatters.multiple,
params: { formatters: [Formatters.checkmark, Formatters.center] },
cssClass: 'text-center', columnGroup: 'Period',
formatter: Formatters.checkmark,
exportWithFormatter: false,
filterable: true, sortable: true,
filter: {
collection: [{ value: '', label: '' }, { value: true, label: 'True' }, { value: false, label: 'False' }],
model: Filters.singleSelect
Expand Down

0 comments on commit f5df421

Please sign in to comment.