-
-
Notifications
You must be signed in to change notification settings - Fork 208
Make autocomplete MenuItems customizable #173
Make autocomplete MenuItems customizable #173
Conversation
Edit: Now I get it. 👍 |
src/ChipInput.js
Outdated
@@ -343,6 +343,16 @@ class ChipInput extends React.Component { | |||
} | |||
} | |||
|
|||
if (typeof chip === 'object') { | |||
if (chip[this.props.dataSourceConfig.text].length === 0 || chip[this.props.dataSourceConfig.value].length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed, it's already handled below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean line 347? Or both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing everything would revert your PR. 😄 I mean lines 347–349
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you're right. It's fine then.
src/ChipInput.js
Outdated
@@ -343,6 +343,16 @@ class ChipInput extends React.Component { | |||
} | |||
} | |||
|
|||
if (typeof chip === 'object') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind changing this to else if (typeof chip === 'object')
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you push your changes? I don't see it yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanted to push everything together
Anything else to fix? |
Maybe you could add a story to the storybook that shows how to use this to customize the menu items and ensure that no other stories break? |
Sure, also I've found one more bug, need to investigate |
I was mistaken, there were no bug, story added, stories did not break |
@darkchaplain Thank you very much! 👍 I'll publish a new release very soon. |
Fixes #172