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

Ability to customize Dialog visible style property #4320

Closed
serlopez46 opened this issue Oct 31, 2017 · 5 comments
Closed

Ability to customize Dialog visible style property #4320

serlopez46 opened this issue Oct 31, 2017 · 5 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@serlopez46
Copy link

There is no guarantee in receiving a 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")

[ ] bug report => Search github for a similar issue or PR before submitting
[X] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Feature Descripton
I would like to ask for the ability to use flexbox in p-dialog component. Currently property "display" in ui-dialog is set to 'block' or 'none' depending on the "visible" attribute. This overrides a possible "display: flex" and using !important would override the 'none' value when dialog should be hidden.
In order to fix this a new div ui-dialog-container could be introduced inside ui-dialog in order to contain the titlebar, content and footer parts of the dialog.

Rough sketch of component structure:

<div class="ui-dialog ui-widget..."
  style="display: block; width: 300px; min-width: 200px; 
  z-index: 1009; left: 745px; top: 8px; opacity: 1;">
  <div class="ui-dialog-container" [ngStyle]="{'display': flex}">
    <div class="ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-corner-top">
      ...
    </div>
    <div class="ui-dialog-content ui-widget-content">
      ...
    </div>
    <div class="ui-dialog-footer ui-widget-content">
      ...
    </div>
  </div>
</div>

What is the motivation / use case for changing the behavior?
More flexible styling of the Dialog component.

Angular version: 2.0.X
4.0.0

PrimeNG version: 2.0.X
4.3.0

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]
All

@cagataycivici
Copy link
Member

What if we add a property like displayStyle="block or flex"?

@pg100
Copy link

pg100 commented Nov 6, 2017

I have similar issue with TabView/TabPanel. Having displayStyle to set block or flex would be great!

@serlopez46
Copy link
Author

A property displayStyle would resolve our problem indeed.

@cagataycivici cagataycivici self-assigned this Nov 17, 2017
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Nov 17, 2017
@cagataycivici cagataycivici added this to the 5.0 milestone Nov 17, 2017
@cagataycivici cagataycivici changed the title Add ui-dialog-container to Dialog Component Ability to customize Dialog visible style property Nov 17, 2017
@cagataycivici
Copy link
Member

We use ui-helper-hidden now instead of style property, so you can do;

.ui-dialog {
   display: flex
}

Same goes for TabPanel

@Arikael
Copy link

Arikael commented Jul 9, 2018

this doesn't work anymore with primeng 6+

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

4 participants