Commit graph

62 commits

Author SHA1 Message Date
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
Xon
88db9639b0 Remove redux store in replace for hand-rolled replacement design for in-place updates of the state. Avoids a lot of data copying, and reduces bundle size 2024-08-12 17:36:17 +08:00
Xon
a335dfcf11 Update tests 2024-08-12 15:26:58 +08:00
Xon
328be8485c Rename txn test 2024-08-12 15:13:40 +08:00
Xon
79eab4c9cb Remove bad test 2024-08-12 14:13:22 +08:00
Xon
4fc4bc44c0 Rename 'loading' state to 'txn' to better match what it is 2024-08-12 14:06:23 +08:00
Xon
3efc69f27c Improve performance of search/filtering with large number of choices by re-using the search index for each character typed.
- The stateless nature of reducers and store listeners being all-or-nothing makes integrating stateful search a poor match
2024-08-12 07:03:39 +08:00
Xon
062b744b64 Fix search results could be unexpectedly unstable, and that fuseOptions.sortFn was effectively ignored #1106 2024-08-12 05:28:05 +08:00