Skip to content

Commit 7785f0b

Browse files
committed
docs: update docs for the foreignInlineList
1 parent adb40a8 commit 7785f0b

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

adminforth/documentation/docs/tutorial/07-Plugins/03-ForeignInlineList.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ If you need to add default filters for the foreign resource based on your curren
121121
>👆It also makes sense to modify the table resource and hide the country field from filters, because this value is hardcoded and equals the country from the record:
122122
123123

124-
```ts
124+
```ts title="./resources/adminuser.ts"
125125

126126
...
127127

@@ -165,3 +165,26 @@ If you need to add default filters for the foreign resource based on your curren
165165
...
166166

167167
```
168+
169+
170+
## Show table from another resource without any filters applied
171+
172+
There might be cases when you want to remove the default filter applied by the plugin and then use the `defaultFilters` callback to apply your own custom filters.
173+
174+
```ts title="./resources/adminuser.ts"
175+
176+
plugins: [
177+
//diff-add
178+
new ForeignInlineListPlugin({
179+
//diff-add
180+
foreignResourceId: 'aparts',
181+
//diff-add
182+
disableForeignListResourceRefColumn: true
183+
//diff-add
184+
}),
185+
//diff-add
186+
],
187+
188+
```
189+
190+
This setup will show, in the show view for each record, the `aparts` resource without any filters. And you don’t have to modify the `aparts` resource.

0 commit comments

Comments
 (0)