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
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/07-Plugins/03-ForeignInlineList.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,7 @@ If you need to add default filters for the foreign resource based on your curren
121
121
>👆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:
122
122
123
123
124
-
```ts
124
+
```ts title="./resources/adminuser.ts"
125
125
126
126
...
127
127
@@ -165,3 +165,26 @@ If you need to add default filters for the foreign resource based on your curren
165
165
...
166
166
167
167
```
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
+
newForeignInlineListPlugin({
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