Menu component: Let consumer add SearchInput/TextInput and remove hasSearchInput prop
See original GitHub issueCopying from conversation with @karelhala, @jenny-s51 and @mcoker in slack:
While I was going trough the component itself I think it could be improved, I don’t think we need to include the hasSearchInput prop at all, we could allow passing custom components as consumers require, here is an example - https://codesandbox.io/s/cocky-yonath-65nuf?file=/index.js
we could provide more components to control that level, i.e. by adding a MenuInput and MenuContent container
<Menu>
<MenuInput>
<SearchInput />
</MenuInput>
<Divider>
<MenuContent>
<MenuList>
<MenuListItem />
<MenuListItem />
</MenuList>
</MenuContent>
</Menu>
Related: https://github.com/patternfly/patternfly-react/issues/5153
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Tile Menu - Salesforce Help
Use the Tile Menu Lightning Web component in Experience Builder to add an intuitive and visually stunning navigation experience to your site.
Read more >Context - React
Context provides a way to pass data through the component tree without having to pass props down manually at every level. In a...
Read more >How To Customize React Components with Props
After adding props to your component, you will use PropTypes to define the type of data you expect a component to receive.
Read more >Work with Components and Props - Twilio Flex
Each programmable component exposes a static Content property that allows you to add to, remove or replace the component and its children.
Read more >React Menu component - Material UI - MUI
A basic menu opens over the anchor element by default (this option can be changed via props). When close to a screen edge,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Technically you can, there are no styles associated with
<MenuGroup>
or<MenuContent>
. They’re just used for sectioning.cc @mcarrano
closed by #5211