Xon
9c43fa60fb
Fix searchEnabled being disabled for select-multiple
2026-01-01 07:42:04 +08:00
Xon
51f77558a9
Merge pull request #1358 from samuelhwilliams/search-render-selected-choices
...
Allow selected options to be hidden when searching
2026-01-01 02:42:08 +08:00
Xon
b47ae9214e
Cleanup searchRenderSelectedChoices option to just be a boolean with backwards compatible defaults
2026-01-01 02:34:43 +08:00
Xon
79b65d71cb
Merge pull request #1357 from thewatts/feature/search-disabled-choices
...
Add `searchDisabledChoices` configuration option to allow disabled choices to appear in search results
2026-01-01 01:53:21 +08:00
Xon
84424c900c
Fix search unit tests
2026-01-01 01:43:24 +08:00
Samuel Williams
b40c7fc59c
Allow selected options to be hidden when searching
2025-10-30 07:51:23 +00:00
Nathaniel Watts
afe7ae455e
Add searchDisabledChoices configuration option
...
This adds a new configuration option `searchDisabledChoices` that allows
disabled choices to appear in search results while remaining non-selectable.
Previously, disabled choices were always excluded from search results via
the Store's searchableChoices getter. This made it impossible for users to
find disabled options even when they wanted to see what options exist but
are currently unavailable.
Changes:
- Add searchDisabledChoices option to Options interface (default: false)
- Update Store.searchableChoices getter to respect the new config
- Add test coverage for the new functionality
- Maintain backward compatibility with default behavior
The selection prevention logic in _handleChoiceAction already prevents
disabled choices from being selected, so they remain non-selectable even
when found in search results.
Fixes the limitation where users couldn't search for disabled options to
see what choices exist but are currently unavailable.
2025-10-24 14:04:50 -05:00
Xon
54629690b2
Update unit tests
2025-08-16 23:16:19 +08:00
Xon
f83f5f0798
Merge pull request #1289 from Choices-js/option-label-attribute
...
Support `<option>` label attribute
2025-03-14 09:39:17 +08:00
Xon
7dc8681057
Support <option> label attribute
2025-03-14 09:36:07 +08:00
Xon
bf2cfb9b98
Merge pull request #1277 from midzer/addSearchByKMP
...
add SearchByKMP
2025-03-14 09:23:18 +08:00
Mike Linnetz
9f41bbf1c0
Issue#941: Remove role="textbox" from search input, per a11y practices.
2025-03-03 15:24:41 -05:00
midzer
dde6088902
fix KMP tests
2025-02-26 15:52:24 +01:00
midzer
b77846d865
add SearchByKMP
2025-02-23 01:32:51 +01:00
Xon
fcfdd9f180
Fix unit test
2025-02-23 06:03:43 +08:00
Xon
d0849aa346
Fix unit test
2024-12-22 09:13:03 +08:00
Xon
59f7d6775a
cleanup tests
2024-09-05 12:47:06 +08:00
Xon
8c56acb44c
Use group reference instead of groupId
2024-09-05 12:13:47 +08:00
Xon
efcb764788
Fix unit test
2024-09-05 03:05:41 +08:00
Xon
6362e49446
Fix unit tests testing the wrong thing
2024-09-04 19:21:57 +08:00
Xon
73b9c25f89
Fix regression "no choices to choose from" notice not triggering when no selectable choices exist for select-one. [ #1185 ]( https://github.com/Choices-js/Choices/issues/1185 )
2024-08-31 07:03:25 +08:00
Xon
2111d60cb7
Fix unit test & e2e test
2024-08-29 16:24:46 +08:00
Xon
9e60d6e0a0
Commit lint fixed file
2024-08-27 20:53:06 +08:00
Xon
d3028c7177
Cleanup unused import
2024-08-27 20:50:47 +08:00
Xon
63653f0bde
Update tests
2024-08-27 20:48:45 +08:00
Xon
f1c317085e
Cleanup unused function and redundant variable assignment
2024-08-27 20:45:39 +08:00
Xon
a2ddd5a664
Simplify groupId check, and push group label rendering into template
2024-08-26 04:21:42 +08:00
Xon
b9d71efe7f
linting fixes
2024-08-26 02:47:22 +08:00
Xon
d969bde7e3
Fix dropdown flip logic did not consider verticality of both sides of the dropdown (ref: https://github.com/formio/Choices/pull/2 )
2024-08-26 02:36:55 +08:00
Xon
3f849e15f7
Remove overly fragile unit testing of rendering
2024-08-26 01:15:05 +08:00
Xon
0d74ffc6f3
Push highlight css toggle into reducer, simplifying state tracking
2024-08-26 01:15:05 +08:00
Xon
4468603e96
Fix fragile highlightall/unhighlightall tests
2024-08-26 01:15:04 +08:00
Xon
e4d01ca9a1
Inline append method
2024-08-22 08:21:01 +08:00
Xon
00a328196b
Fix remote data e2e test
2024-08-19 10:02:47 +08:00
Xon
7dc8bd168c
Notices are trusted and any user data is escaped, simplify notice rendering code, and fix inconsistency in rendering the "press enter to add X" notice.
2024-08-19 09:17:28 +08:00
Xon
5a100e6d7f
Prefix build flags with CHOICES_, setup canUseDom to be setable via enviromental variables
2024-08-19 09:06:37 +08:00
Xon
ac88d83381
Use querySelector<HTMLElement>/querySelectorAll<HTMLElement> to type hint the return type as expected
2024-08-19 06:30:38 +08:00
Xon
687895f54c
Fix unit tests no supplying the template renderer with the context they are expecting
2024-08-17 20:43:14 +08:00
Xon
fc6f905432
JSDOM support 'ch' character widths
2024-08-17 20:27:52 +08:00
Xon
6733bfc1b8
Fix unit tests
2024-08-17 19:11:49 +08:00
Xon
362d0e5ffc
Switch from string literal type to effectively valueOf<NoticeTypes> to intern strings
2024-08-17 02:10:54 +08:00
Xon
0f9e6bc501
Update unit tests
2024-08-16 19:38:43 +08:00
Xon
72528442c7
Rationalize input handling (_onEnterKey/_onInput/_handleChoiceAction). Improve consistancy about when a dropdown is shown, ie have a notice or select items to show. Enter toggles the dropdown open/closed consistantly across different backing element modes
2024-08-16 08:59:32 +08:00
Xon
f66b89a04a
typescript is used to type checking
2024-08-15 21:23:11 +08:00
Xon
b92b36d459
Move notice handling into it's own set of functions instead of being spread over the rendering loop, and various input handlers on what leaves a notice around
2024-08-15 21:23:07 +08:00
Xon
5bee41d7ff
Remove low-usage functions to byte-shave bundle & other byte-shaving
2024-08-15 20:42:36 +08:00
Xon
f8de8cac44
Bundle byte-shaving
2024-08-15 19:21:21 +08:00
Xon
b4055ec65c
Update template unit tests, and groupId being set to "empty"
2024-08-15 17:53:28 +08:00
Xon
00433d200d
It isn't the 1990s where 1080p monitors were exotic
2024-08-14 19:53:48 +08:00
Xon
d65a471b67
Fix resetting the store inside a transaction did not defer the listener notification
2024-08-12 18:23:26 +08:00