Skip to content
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

Allow array of letters for section header #12

Open
Thiousi opened this issue Apr 14, 2021 · 4 comments
Open

Allow array of letters for section header #12

Thiousi opened this issue Apr 14, 2021 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Thiousi
Copy link

Thiousi commented Apr 14, 2021

Some alphabets include variations of letters which are typically grouped together in an alphabet list. This would be a great feature to add to this plugin for international support.
For example, maybe we could do something like

const myCustomIndex = [
    "a",
    "b",
    "c",
    "ç",
    "d",
    "e",
    "f",
    ["g", "ğ"],
    "h",
    "i",
    ...
]

Thanks!

Originally posted by @Kieran-McIntyre in #6 (comment)

@dhairyasenjaliya
Copy link

@Thiousi are you able to update list dynamically?

@Thiousi
Copy link
Author

Thiousi commented Apr 15, 2021

@dhairyasenjaliya Are you talking about updating the CustomIndex? I haven't tried it.

@dhairyasenjaliya
Copy link

@Thiousi No the actual data source object

@Thiousi
Copy link
Author

Thiousi commented Apr 15, 2021

@dhairyasenjaliya I haven't had the need for that use case but I don't see a reason why you wouldn't be able to do it.
AlphabetList is using SectionList, which accepts the extraData prop. See here: https://reactnative.dev/docs/sectionlist#extradata
I have not tried it but don't see a reason for it not working.

@Kieran-McIntyre Kieran-McIntyre added question Further information is requested enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed and removed question Further information is requested labels Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants