Repository navigation
Commit d02f7e4
Let a relational field send arguments with its search
`data-search-args` was rendered, the script forwarded it, the endpoint
cleaned it and the callback took it as a third argument -- and nothing could
ever put anything in it. search_args() returned an empty array and read no
configuration, so the whole path existed and was unreachable from a field.
It reads `search_args` now. The reason to want it is context the search term
does not carry: most often which record the picker is sitting in, so the
callback can leave that one out. A product's "also suggest" offering the
product itself is a choice that looks available, and is thrown away on save.
Scalars only, matching what the endpoint reduces them to anyway -- a nested
array would reach the callback as the string "Array" and read as a filter
that had been applied.
Subclasses that build their own arguments still override; a post picker has
a post type to send and no use for anything a caller invents.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tk8y5eZa3CHVVSM6nVxsJw1 parent 1e56b86 commit d02f7e4
2 files changed
Lines changed: 56 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
77 | 88 | | |
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
82 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
83 | 100 | | |
84 | 101 | | |
85 | 102 | | |
| |||
284 | 301 | | |
285 | 302 | | |
286 | 303 | | |
287 | | - | |
| 304 | + | |
288 | 305 | | |
289 | 306 | | |
290 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
246 | 283 | | |
0 commit comments