-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
fix: show empty message when no options #1615
fix: show empty message when no options #1615
Conversation
Bug Fixes
Contributors@LeandroTorresSicilia, @amontalvof, @TahimiLeonBravo Commit-Lint commandsYou can trigger Commit-Lint actions by commenting on this PR:
|
@@ -0,0 +1,29 @@ | |||
import React from 'react'; |
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.
start filename with lowercase
@@ -54,13 +56,15 @@ const InternalDropdown = forwardRef((props, reference) => { | |||
const [activeOptionName, setActiveOptionName] = useState(null); | |||
const [activeOptionIndex, setActiveOptionIndex] = useState(0); | |||
const [activeChildrenMap, setActiveChildrenMap] = useState(); | |||
const [emptyMessage, setEmptyMessage] = useState(''); |
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.
let's call this searchValue:
const [searchValue, setSearchValue] = useState('');
> | ||
<Content isLoading={isLoading}> | ||
<Provider value={context}>{children}</Provider> | ||
</Content> | ||
</Ul> | ||
<RenderIf isTrue={showEmptyMessage}> | ||
<EmptyMessage emptyMessage={emptyMessage} /> |
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.
same here, also change the prop to searchValue
export const MessageHighLight = attachThemeAttrs(styled.p)` | ||
font-size: 16px; | ||
font-weight: 900; | ||
color: ${props => props.palette.text.main}; |
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.
use 4 space for indentation
…nexxtway/react-rainbow into internal-dropdown-empty-message
fix: #1609
Changes proposed in this PR:
I have followed (at least) the PR section of the contributing guide.
@nexxtway/react-rainbow