You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (data.find(record=>record.id===event.payload.ids[0])) {
40
-
notity(`Movie #${event.payload.ids[0]} updated`);
40
+
notify(`Movie #${event.payload.ids[0]} updated`);
41
41
refetch();
42
42
}
43
43
break;
44
44
}
45
45
case'deleted': {
46
46
if (data.find(record=>record.id===event.payload.ids[0])) {
47
-
notity(`Movie #${event.payload.ids[0]} deleted`);
47
+
notify(`Movie #${event.payload.ids[0]} deleted`);
48
48
refetch();
49
49
}
50
50
break;
@@ -80,25 +80,25 @@ const MovieList = () => (
80
80
Whenever an event is published on the `resource/[resource]` topic, the function passed as the first argument will be called with the event as a parameter.
81
81
82
82
```jsx
83
-
constnotity=useNotify();
83
+
constnotify=useNotify();
84
84
const { refetch, data } =useListContext();
85
85
useSubscribeToRecordList(event=> {
86
86
switch (event.type) {
87
87
case'created': {
88
-
notity('New movie created');
88
+
notify('New movie created');
89
89
refetch();
90
90
break;
91
91
}
92
92
case'updated': {
93
93
if (data.find(record=>record.id===event.payload.ids[0])) {
94
-
notity(`Movie #${event.payload.ids[0]} updated`);
94
+
notify(`Movie #${event.payload.ids[0]} updated`);
95
95
refetch();
96
96
}
97
97
break;
98
98
}
99
99
case'deleted': {
100
100
if (data.find(record=>record.id===event.payload.ids[0])) {
In addition to the [`useLockCallbacks`](#uselockcallbacks) parameters, `<LockStatusBase>` accepts a `render` prop. The function passed to the `render` prop will be called with the result of the `useLockCallbacks` hook.
84
+
In addition to the [`useLockCallbacks`](./useLockCallbacks.md) parameters, `<LockStatusBase>` accepts a `render` prop. The function passed to the `render` prop will be called with the result of the `useLockCallbacks` hook.
Copy file name to clipboardExpand all lines: docs_headless/src/content/docs/canAccessWithPermissions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ This function takes an object as argument with the following fields:
65
65
| `resource` | Required | `string` | The resource for which to check users has the execution right
66
66
| `record` | Required | `string` | The record for which to check users has the execution right
67
67
68
-
`canAccessWithPermissions` expects the `permissions` to be a flat array of permissions. It is your responsibility to fetch these permissions (usually during login). If the permissions are spread into several role definitions, you can merge them into a single array using the [`getPermissionsFromRoles`](#getpermissionsfromroles) function.
68
+
`canAccessWithPermissions` expects the `permissions` to be a flat array of permissions. It is your responsibility to fetch these permissions (usually during login). If the permissions are spread into several role definitions, you can merge them into a single array using the [`getPermissionsFromRoles`](./getPermissionsFromRoles.md) function.
Copy file name to clipboardExpand all lines: docs_headless/src/content/docs/useGetListLive.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,4 +33,4 @@ const LatestNews = () => {
33
33
34
34
The hook will subscribe to live updates on the list of records (topic: `resource/[resource]`) and will refetch the list when a new record is created, or an existing record is updated or deleted.
35
35
36
-
See the [useGetList](https://marmelab.com/react-admin/useGetList.html) documentation for the full list of parameters and return type.
36
+
See the [useGetList](./useGetList.md) documentation for the full list of parameters and return type.
if (data.find(record=>record.id===event.payload.ids[0])) {
37
-
notity(`Movie #${event.payload.ids[0]} updated`);
37
+
notify(`Movie #${event.payload.ids[0]} updated`);
38
38
refetch();
39
39
}
40
40
break;
41
41
}
42
42
case'deleted': {
43
43
if (data.find(record=>record.id===event.payload.ids[0])) {
44
-
notity(`Movie #${event.payload.ids[0]} deleted`);
44
+
notify(`Movie #${event.payload.ids[0]} deleted`);
45
45
refetch();
46
46
}
47
47
break;
@@ -72,25 +72,25 @@ const MovieList = () => (
72
72
Whenever an event is published on the `resource/[resource]` topic, the function passed as the first argument will be called with the event as a parameter.
73
73
74
74
```tsx
75
-
constnotity=useNotify();
75
+
constnotify=useNotify();
76
76
const { refetch, data } =useListContext();
77
77
useSubscribeToRecordList(event=> {
78
78
switch (event.type) {
79
79
case'created': {
80
-
notity('New movie created');
80
+
notify('New movie created');
81
81
refetch();
82
82
break;
83
83
}
84
84
case'updated': {
85
85
if (data.find(record=>record.id===event.payload.ids[0])) {
86
-
notity(`Movie #${event.payload.ids[0]} updated`);
86
+
notify(`Movie #${event.payload.ids[0]} updated`);
87
87
refetch();
88
88
}
89
89
break;
90
90
}
91
91
case'deleted': {
92
92
if (data.find(record=>record.id===event.payload.ids[0])) {
0 commit comments