Commit Graph

69 Commits

Author SHA1 Message Date
Tom Southall
6287c16caa Assume promises resolve to an array of results rather than an object with a data property 2022-03-02 14:06:27 +00:00
Tom Southall
aaeeaccafc Create Recent Searches plugin 2022-03-02 00:40:29 +00:00
Tom Southall
ef61208854 Add ability to supply plugins in props 2022-03-02 00:40:05 +00:00
Tom Southall
19e800fd8b Add displayField as second onSelect argument 2022-03-01 22:37:41 +00:00
Tom Southall
eb1d3a82db Add group ID 2022-03-01 21:12:49 +00:00
Tom Southall
71f41f896c Update split-match version
Tweaks to examples
2022-02-25 22:38:18 +00:00
Tom Southall
52265d92fe Test watch now npm run watch 2022-02-25 13:51:14 +00:00
Tom Southall
f74b64bd5a Rename dataSearchType prop to searchType 2022-02-25 00:39:01 +00:00
Tom Southall
70573f6e22 Change font weight in example 2022-02-25 00:37:16 +00:00
Tom Southall
3a8b0ba4ff Add useSWR error handling, errorMessage prop and errorbox component 2022-02-25 00:26:44 +00:00
Tom Southall
96525d8b6d Add a GroupName custom component 2022-02-24 15:37:46 +00:00
Tom Southall
c94a5d18ee Update tests 2022-02-24 14:34:38 +00:00
Tom Southall
e414f8efa1 Remove console.log 2022-02-24 14:25:45 +00:00
Tom Southall
1deef54576 Correctly handle clearing search input 2022-02-24 14:22:44 +00:00
Tom Southall
9d60c6e667 Give SplitMatch component some PropTypes validation 2022-02-23 23:04:41 +00:00
Tom Southall
76bf7f2f99 Remove text splitting and make text matching an option with a prop 2022-02-23 22:59:20 +00:00
Tom Southall
a1242eec5d Add ability to pass in an Item component
Create SplitMatch component

Create first (WIP) example
2022-02-23 21:41:55 +00:00
Tom Southall
f9467a8ede Rename splitChar to separator 2022-02-22 00:43:18 +00:00
Tom Southall
6e1b054195 dataSearchType now determines how list items are highlighted
Full search string now highlighted for startswith searches

Regularised item markup
2022-02-22 00:35:51 +00:00
Tom Southall
583726fcb9 Consolidate itemGroups and data props into a single listbox prop 2022-02-21 21:07:52 +00:00
Tom Southall
ac6f749762 Make ListBox one word: Listbox 2022-02-21 20:08:03 +00:00
Tom Southall
f9bf89b108 Add unit tests for reducer 2022-02-21 19:49:28 +00:00
Tom Southall
464459435d Fix broken tests 2022-02-21 18:46:53 +00:00
Tom Southall
a805a90222 Unit tests for actions 2022-02-21 18:40:52 +00:00
Tom Southall
c2c8ccca90 Remove console.log 2022-02-21 18:28:22 +00:00
Tom Southall
8e12ba19f8 Ensure first of default items is not highlighted
Move logic from actions to reducer
2022-02-21 17:51:44 +00:00
Tom Southall
69e344d29d Clear selected value when query changes 2022-02-21 17:08:46 +00:00
Tom Southall
d66a2f413d Simplify rules for whether listbox is expanded 2022-02-21 16:42:55 +00:00
Tom Southall
1e91265556 Add examples folder 2022-02-21 15:57:53 +00:00
Tom Southall
cde5b0a91b Rename Items component as ListBox 2022-02-20 22:13:45 +00:00
Tom Southall
4a5d0b0ad4 Add disabled prop to replace isDisabled 2022-02-20 21:51:12 +00:00
Tom Southall
c70c6a9fce Bump version 2022-02-20 00:25:55 +00:00
Tom Southall
69cd22a716 Bump version 2022-02-20 00:20:50 +00:00
Tom Southall
837d16a44c Remove nanoid dependency
Replace × with \u00d7
2022-02-20 00:19:20 +00:00
Tom Southall
d7db51adc2 Up version 2022-02-19 22:31:11 +00:00
Tom Southall
8090af703c Remove unnecessary await 2022-02-19 22:24:47 +00:00
Tom Southall
9484556d65 First pass at some integration tests 2022-02-19 22:20:39 +00:00
Tom Southall
ec8a714f73 Fix bug preventing clear button from working 2022-02-19 17:24:09 +00:00
Tom Southall
913156cfed Add role to Items element 2022-02-19 17:19:49 +00:00
Tom Southall
59d023d956 Call isHighlighted function 2022-02-19 17:14:01 +00:00
Tom Southall
ffb131530a Add id prop to container test 2022-02-19 17:12:20 +00:00
Tom Southall
d14bd62aeb Add ARIA accessbility attributes to elements 2022-02-19 17:09:45 +00:00
Tom Southall
2bb09af284 Tests for useData hook 2022-02-18 21:54:01 +00:00
Tom Southall
98d56cc702 Rudimentary test for container 2022-02-17 23:06:19 +00:00
Tom Southall
4e0e05635a Add useSelected hook 2022-02-17 22:39:33 +00:00
Tom Southall
7fc85cac8b Remove redundant variables 2022-02-17 21:16:15 +00:00
Tom Southall
3488c2951c Add useHighlight hook 2022-02-17 21:14:56 +00:00
Tom Southall
fc76372086 Remove loading feature 2022-02-17 20:33:56 +00:00
Tom Southall
ea835df0e4 Add useItemsState hook
Store props in state

Enforce minimum of 1 for minQueryLength prop
2022-02-17 19:47:44 +00:00
Tom Southall
c110222c9d Move customStyles and splitChar to global state 2022-02-17 15:45:42 +00:00