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

Add transitionOptions property to Components that use CSSTransition API #1917

Closed
dattebayorob opened this issue Mar 29, 2021 · 1 comment
Closed
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@dattebayorob
Copy link

There is no guarantee in receiving an immediate response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeReact PRO Support where support is provided within 4 business hours

I'm submitting a ... (check one with "x")

[ ] bug report
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Codesandbox Case (Bug Reports)
https://codesandbox.io/s/primereact-test-forked-smf90?fontsize=14&hidenavigation=1&theme=dark

Current behavior
Content of tab is Unmounted when index changes

Expected behavior
This behavior should be parameterized, allowing passing a prop to not unmount children when tab changes ( https://github.com/primefaces/primereact/blob/master/src/components/accordion/Accordion.js#L140 )

  • React version:
    17

  • PrimeReact version:
    6.2.1

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    all

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    Typescript 4.1.2

@dattebayorob dattebayorob changed the title Accordion: Externalize CSSTransition unmountOnExit Prop Accordion: Expose CSSTransition unmountOnExit Prop Mar 29, 2021
@mertsincan
Copy link
Member

mertsincan commented Apr 12, 2021

Hi,
I added transitionOptions property to the following components. All properties of CSSTransition are customizable, except for nodeRef and in properties.

<Dropdown transitionOptions={{onEnter: () => console.log('onEnter'), onEntered: () => console.log('onEntered'), unmountOnExit: false}} .../>

Details; https://reactcommunity.org/react-transition-group/css-transition

Components;

  • Accordion
  • AutoComplete
  • Calendar
  • CascadeSelect
  • ColorPicker
  • ConfirmPopup
  • ContextMenu
  • Dialog
  • Dropdown
  • Fieldset
  • Galleria
  • Menu
  • Messages
  • MultiSelect
  • OverlayPanel
  • Panel
  • PanelMenu
  • Password
  • ScrollTop
  • Sidebar
  • SlideMenu
  • SplitButton
  • TieredMenu
  • Toast

@mertsincan mertsincan changed the title Accordion: Expose CSSTransition unmountOnExit Prop Add transitionOptions property to Components that use CSSTransition API Apr 12, 2021
@mertsincan mertsincan self-assigned this Apr 12, 2021
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Apr 12, 2021
@mertsincan mertsincan added this to the 6.2.2 milestone Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
mertsincan added a commit that referenced this issue Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants