Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Please export the defaultChipRenderer #206

Closed
frenya opened this issue May 13, 2018 · 5 comments
Closed

Please export the defaultChipRenderer #206

frenya opened this issue May 13, 2018 · 5 comments

Comments

@frenya
Copy link
Contributor

frenya commented May 13, 2018

Hello,

would it be possible to export the defaultChipRenderer function in ChipInput.js? It would allow for easier customisation of chips in special cases.

Example use case: Make the first chip non-deletable

const chipRenderer = ({ handleRequestDelete, ...otherProps }, key) => (
  defaultChipRenderer({
    handleRequestDelete: key ? handleRequestDelete : null
    ...otherProps
  }, key)
);

Currently, I need to fully replicate the defaultChipRenderer including styles, colors etc. to be consistent. Exporting the renderer would make life much easier.

Pretty please :)

Frank

P.S. I could make a pull request, but it's really just adding the "export" keyword.

@leMaik
Copy link
Member

leMaik commented May 13, 2018

@frenya It sounds like a great first PR anyway. 👍
If you also export it in the next branch, it's even two PRs. Feel free to submit them, if you want. 😎

frenya added a commit to frenya/material-ui-chip-input that referenced this issue May 13, 2018
Exporting defaultChipRenderer allows better customisation in special cases. Addresses issue TeamWertarbyte#206.
@frenya
Copy link
Contributor Author

frenya commented May 13, 2018

If you insist ... 😄

#207

leMaik pushed a commit that referenced this issue May 13, 2018
Exporting defaultChipRenderer allows better customisation in special cases. Addresses issue #206.
@leMaik
Copy link
Member

leMaik commented May 13, 2018

@frenya Thank you, I'll cherry-pick that so that you don't have to submit a new PR for the next branch. 😉

@frenya
Copy link
Contributor Author

frenya commented May 13, 2018

Thanks 👍

leMaik pushed a commit that referenced this issue May 13, 2018
Exporting defaultChipRenderer allows better customisation in special cases. Addresses issue #206.
@leMaik
Copy link
Member

leMaik commented May 13, 2018

@frenya v0.19.0 (one added keyword caused a minor version bump :D) was just released 🎉

@leMaik leMaik closed this as completed May 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants