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
> react-native-section-alphabet-list@2.1.0 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.
> react-native-section-alphabet-list@2.1.0 lint
> eslint
> react-native-section-alphabet-list@2.1.0 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.