Skip to content

Commit

Permalink
docs: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mle-moni committed Aug 14, 2024
1 parent 0d0f5ef commit 014911f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docs/src/content/docs/reference/views/models/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -214,23 +214,21 @@ In most cases, it will not make sense to use this because the field will be comp

e.g.
```ts
{
virtualColumns: [
{
name: 'upperCaseEmail',
adomin: {
type: 'string',
label: 'Upper case email',
},
getter: async (model) => {
return model.email.toUpperCase()
},
setter: async (model, value) => {
console.log('Setter called for virtual column', model.id, value)
},
virtualColumns: [
{
name: 'upperCaseEmail',
adomin: {
type: 'string',
label: 'Upper case email',
},
],
}
getter: async (model) => {
return model.email.toUpperCase()
},
setter: async (model, value) => {
console.log('Setter called for virtual column', model.id, value)
},
},
],
```

## Types of fields
Expand Down Expand Up @@ -259,6 +257,8 @@ e.g.

### HasOne field

### ManyToMany field

<br />

#### Waiting for ~~love~~ docs
Expand Down

0 comments on commit 014911f

Please sign in to comment.