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

fix: show empty message when no options #1615

Merged
merged 10 commits into from
Jun 11, 2020

Conversation

LeandroTorresSicilia
Copy link
Member

fix: #1609

Changes proposed in this PR:

@nexxtway/react-rainbow

@commit-lint
Copy link

commit-lint bot commented Jun 6, 2020

Bug Fixes

  • show empty message when no options (bd8a50a)
  • dropdown text styles modified (09373b6)
  • fixed Message High Light Container (6c03f63)
  • const name changed to searchValue and 4 spaces identation fixed (3d1b178)
  • rename EmptyMessage.js to emptyMessage.js (2d59605)

Contributors

@LeandroTorresSicilia, @amontalvof, @TahimiLeonBravo

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@@ -0,0 +1,29 @@
import React from 'react';
Copy link
Member Author

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('');
Copy link
Member Author

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} />
Copy link
Member Author

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};
Copy link
Member Author

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

@LeandroTorresSicilia LeandroTorresSicilia merged commit 1194069 into master Jun 11, 2020
@LeandroTorresSicilia LeandroTorresSicilia deleted the internal-dropdown-empty-message branch June 11, 2020 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: show a message on the InternalDropdown when typing on the search not find coincidences
3 participants