-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(types): change IData.value type to generic #55
base: master
Are you sure you want to change the base?
feat(types): change IData.value type to generic #55
Conversation
As far as I can tell the commit looks good. Lmk if more testing pipeline stuff needs doing. $ npm run test && npm run lint && npm run build
> [email protected] test
> jest --config jest.config.js
PASS src/utils/getSectionData.test.ts
PASS src/components/ListLetterIndex/index.test.tsx
PASS src/components/AlphabetList/index.test.tsx
Test Suites: 3 passed, 3 total
Tests: 18 passed, 18 total
Snapshots: 0 total
Time: 3.048s
Ran all test suites.
> [email protected] lint
> eslint
> [email protected] build
> rm -rf dist && tsc |
Thanks @NVRC! This looks good, will get it merged and will release a new version. The new version will be |
Sorry, I spoke a little too soon. We're seeing some failing tests, but doesn't look related to your PR. I have a PR to fix this, so will merge my fixes, then you will need to merge master into your branch. Please give me a few minutes to do this. |
@Kieran-McIntyre No rush. I jumped the gun a little with the PR anyways since I didn't add a test case for the complex obj. |
@NVRC Okay no worries. I've pushed a new version to master ( |
A side effect of this change is that the default sorting behaviour needs some rethinking. With the current assumption that With another prop we can maintain the existing behaviour and let users define a function to extract the sortable index. This works like a Proposal ... AlphabetListProps ...
indexExtractor?: (item: IData<Type>) => string; Default @Kieran-McIntyre Thoughts? |
@NVRC Yes, this looks like a good proposal and would resolve the issue. We will also need to update the README to clarify how this should be used. But happy to go with this 👍 |
No description provided.