Skip to content

Commit 9dc920f

Browse files
committed
Remove query state props in some parts of the doc where it's not required.
1 parent 7fedbca commit 9dc920f

File tree

5 files changed

+2
-38
lines changed

5 files changed

+2
-38
lines changed

docs/ReferenceFieldBase.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,7 @@ For instance, with this code:
226226
import { ListBase, RecordsIterator, ReferenceFieldBase } from 'react-admin';
227227

228228
export const PostList = () => (
229-
<ListBase
230-
loading={null}
231-
error={null}
232-
offline={null}
233-
>
229+
<ListBase>
234230
<RecordsIterator>
235231
<ReferenceFieldBase source="user_id" reference="users">
236232
<AuthorView />

docs/ReferenceManyFieldBase.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ You can also use `<ReferenceManyFieldBase>` in a list, e.g. to display the autho
7575
import { ListBase, RecordsIterator, ReferenceManyFieldBase } from 'react-admin';
7676

7777
export const PostList = () => (
78-
<ListBase
79-
loading={null}
80-
error={null}
81-
offline={null}
82-
>
78+
<ListBase>
8379
<RecordsIterator>
8480
<ReferenceManyFieldBase reference="comments" target="post_id">
8581
<CustomAuthorView source="name"/>
@@ -131,10 +127,6 @@ export const AuthorShow = () => (
131127
label="Books"
132128
reference="books"
133129
target="author_id"
134-
loading={<p>Loading...</p>}
135-
error={null}
136-
offline={null}
137-
empty={null}
138130
>
139131
<ul>
140132
<RecordsIterator
@@ -358,10 +350,6 @@ In the example below, both lists use the same reference ('books'), but their sel
358350
queryOptions={{
359351
meta: { foo: 'bar' },
360352
}}
361-
loading={<p>Loading...</p>}
362-
error={null}
363-
offline={null}
364-
empty={<p>No books</p>}
365353
>
366354
<RecordsIterator render={(book) => (
367355
<p>{book.title}</p>
@@ -374,10 +362,6 @@ In the example below, both lists use the same reference ('books'), but their sel
374362
meta: { foo: 'bar' },
375363
}}
376364
storeKey="custom"
377-
loading={<p>Loading...</p>}
378-
error={null}
379-
offline={null}
380-
empty={<p>No books</p>}
381365
>
382366
<RecordsIterator render={(book) => (
383367
<p>{book.title}</p>

docs/WithListContext.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ If `empty` is not provided, the render function will be called with empty data.
156156
))}
157157
</ul>
158158
)}
159-
loading={<p>Loading...</p>}
160159
/>
161160
```
162161

@@ -179,7 +178,6 @@ If `error` is not provided, the render function will be called with the error.
179178
))}
180179
</ul>
181180
)}
182-
loading={<p>Loading...</p>}
183181
/>
184182
```
185183

docs_headless/src/content/docs/ReferenceManyFieldBase.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ export const AuthorShow = () => (
121121
label="Books"
122122
reference="books"
123123
target="author_id"
124-
loading={<p>Loading...</p>}
125-
error={null}
126-
offline={null}
127-
empty={null}
128124
>
129125
<ul>
130126
<RecordsIterator
@@ -341,10 +337,6 @@ In the example below, both lists use the same reference ('books'), but their sel
341337
queryOptions={{
342338
meta: { foo: 'bar' },
343339
}}
344-
loading={<p>Loading...</p>}
345-
error={null}
346-
offline={null}
347-
empty={<p>No books</p>}
348340
>
349341
<RecordsIterator render={(book) => (
350342
<p>{book.title}</p>
@@ -357,10 +349,6 @@ In the example below, both lists use the same reference ('books'), but their sel
357349
meta: { foo: 'bar' },
358350
}}
359351
storeKey="custom"
360-
loading={<p>Loading...</p>}
361-
error={null}
362-
offline={null}
363-
empty={<p>No books</p>}
364352
>
365353
<RecordsIterator render={(book) => (
366354
<p>{book.title}</p>

docs_headless/src/content/docs/WithListContext.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ If `empty` is not provided, the render function will be called with empty data.
158158
))}
159159
</ul>
160160
)}
161-
loading={<p>Loading...</p>}
162161
/>
163162
```
164163

@@ -181,7 +180,6 @@ If `error` is not provided, the render function will be called with the error.
181180
))}
182181
</ul>
183182
)}
184-
loading={<p>Loading...</p>}
185183
/>
186184
```
187185

0 commit comments

Comments
 (0)