primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Dropdown autowidth is not working when it used inside the TabView

Open udithaindika opened this issue 8 years ago • 0 comments

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

  1. Create a TabView
  2. Add Two TabPanels to the TabView
  3. Add the Same Dropdown to both these TabPanels(see following JSX)
  4. When view this in the Browser , Dropdown in the First Tab have the proper Width
  5. 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]

udithaindika avatar Mar 23 '18 05:03 udithaindika