Skip to content

Commit

Permalink
add react-admin v4 compatibility, update changelog for v0.5.0 (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaColonnello authored Jun 9, 2022
1 parent 5e44f94 commit 0c7c7dc
Show file tree
Hide file tree
Showing 13 changed files with 1,441 additions and 28,011 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.5.0 (June 6, 2022)

- Upgrade library and sample to React Admin v4, thanks to @LucaColonnello

## 0.4.2 (May 6, 2022)

- Example: Add Example v3 App
Expand Down
42 changes: 22 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,28 +561,29 @@ Will produce the following payload:
```

## Jsonb filtering

```jsx
<TextField
label="Theme Color"
source="users#preferences@_contains@ux#theme"
/>
<TextField label="Theme Color" source="users#preferences@_contains@ux#theme" />
```

Will produce payload:

```json
{
"where": {
"_and": [{
"users": {
"preferences": {
"_contains": {
"ux": {
"theme": "%TEXT"
"_and": [
{
"users": {
"preferences": {
"_contains": {
"ux": {
"theme": "%TEXT"
}
}
}
}
}
}],

]
},
"limit": 10,
"offset": 0,
Expand All @@ -593,6 +594,7 @@ Will produce payload:
```

Fetch data matching a jsonb `_contains` operation

```jsx
<FunctionField render={(rec: {processor = "apple" | "google" | "stripe", ...})
<ReferenceManyField
Expand All @@ -608,20 +610,20 @@ Fetch data matching a jsonb `_contains` operation
```

Will produce payload:

```json
{
"where": {
"_and":[
"_and": [
{
"payments": {
"details":
{
"_contains": {
"processor": {
"%{rec.processor}_id": "%{rec.id}"
}
"details": {
"_contains": {
"processor": {
"%{rec.processor}_id": "%{rec.id}"
}
}
}
}
}
]
Expand Down Expand Up @@ -649,7 +651,7 @@ will generate a query with an `order_by` variable like
order_by: [{ title: "asc" }, { is_completed: "desc" }]
```

Fields may contain dots to specify sorting by nested object properties similarly to React Admin ``source`` property.
Fields may contain dots to specify sorting by nested object properties similarly to React Admin `source` property.

## Contributing

Expand Down
Loading

0 comments on commit 0c7c7dc

Please sign in to comment.