i-like-robots / react-tag-autocomplete

⚛️ A simple, accessible, tagging component ready to drop into your React projects (new repo)
https://i-like-robots.github.io/react-tag-autocomplete/
ISC License
178 stars 12 forks source link

added renderTaglist #71

Closed ellunium closed 4 months ago

ellunium commented 4 months ago

Added the renderTagList prop with test, examples and description to readme.

@i-like-robots Like I said, it's not much , but could you please review? I think the TagList component needs optimising, maybe needs props? Let me know hat you think. Thanks!

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9415315860

Details


Totals Coverage Status
Change from base Build 7907714774: 0.09%
Covered Lines: 1509
Relevant Lines: 1624

💛 - Coveralls
i-like-robots commented 4 months ago

Thanks for your contribution @ellunium and for the nice example too. I should be able to review and test this week 👍

ellunium commented 4 months ago

Thanks for your contribution - I'm going to merge this but make a few changes before releasing. I intend to refactor all of the list props into the useTagList hook so that it is consistent with the other custom renderers and implementors can create a custom list and spread the props rather than declaring each attribute individually:

<div className={classNames.tagList} {...tagListProps}>
  {children.map((child) => (
    <div className={classNames.tagListItem} key={child.key}>
      {child}
    </div>
  ))}
</div>

Makes perfect sense!