primereact
primereact copied to clipboard
Dropdown autowidth is not working when it used inside the TabView
There is no guarantee in receiving an immediate response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeNG PRO Support where support is provided within 4 business hours
I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=57
Plunkr Case (Bug Reports) https://plnkr.co/edit/gc5ndj?p=preview](https://plnkr.co/edit/gc5ndj?p=preview https://codesandbox.io/s/zq80v2j6ox
Current behavior When a Dropdown is used inside a non active TabPanel of a TabView, the Width of the DropDown is not properly set.
Expected behavior Dropdown width should set regardless of the TabPanel its being used.
Minimal reproduction of the problem with instructions
- Create a TabView
- Add Two TabPanels to the TabView
- Add the Same Dropdown to both these TabPanels(see following JSX)
- When view this in the Browser , Dropdown in the First Tab have the proper Width
- Dropdown in the second Tab don't have the proper width(width is about 30px)
<TabView>
<TabPanel header="Tab1">
<Dropdown
options={citySelectItems}
placeholder="Select a City"
autoWidth={true}
/>
</TabPanel>
<TabPanel header="Tab2">
<Dropdown
options={citySelectItems}
placeholder="Select a City"
autoWidth={true}
/>
</TabPanel>
</TabView>
Please tell us about your environment: Windows,Webstorm, NPM, Webpack-dev-server
React version: React v.16.2
PrimeReact version: PrimeReact v 1.5.0
Browser: [all]
Language: [ES6/7]