Commit 41c45d7
feat(select): support function tokenSeparators
Mirrors react-component/select#1220 (rc-select 1.7.0). When
`tokenSeparators` is a function, it receives the raw input and returns
the tokens to split into chips. Useful for callers that need richer
than character-based tokenization (e.g. regex, async tokenization
hints, custom token detection logic).
Extract the split decision into a `splitByTokenSeparators` helper so
the BaseSelect search path can route through either the function or
the legacy string-array `getSeparatedContent` branch. `tokenWithEnter`
is also updated to short-circuit to `true` for the function form
(can't predict whether a function will emit newlines).
Bumps `@v-c/select` from 1.0.23 to 1.1.0-rc.1 to ship the API change
behind the rc tag.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b73bd92 commit 41c45d7
2 files changed
Lines changed: 25 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
382 | 384 | | |
383 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
384 | 404 | | |
385 | 405 | | |
386 | 406 | | |
| |||
390 | 410 | | |
391 | 411 | | |
392 | 412 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
| 413 | + | |
399 | 414 | | |
400 | | - | |
| 415 | + | |
401 | 416 | | |
402 | 417 | | |
403 | 418 | | |
| |||
0 commit comments