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

NbWindowControlButtonsConfig does not have option to hide the close button #2894

Closed
apappas1129 opened this issue Oct 12, 2021 · 3 comments · Fixed by #2952
Closed

NbWindowControlButtonsConfig does not have option to hide the close button #2894

apappas1129 opened this issue Oct 12, 2021 · 3 comments · Fixed by #2952
Assignees

Comments

@apappas1129
Copy link

apappas1129 commented Oct 12, 2021

NbWindowControlButtonsConfig should also have the option to hide the x button at the top right.

Right now, I am forced to write

::ng-deep {
   nb-window {
        nb-card-header {
            .buttons {
                // Only way to remove NbWindow's close button
                display: none !important;
            }
        }
    }
}

Please update so that we have

export interface NbWindowControlButtonsConfig {
    minimize: boolean;
    maximize: boolean;
    fullScreen: boolean;
    close: boolean; // <---   we need this
}
@apappas1129
Copy link
Author

I prefer Window over Dialog also because of how you write handling of the context. The two have it done very differently. I don't want to have inconsistent code regarding how data/context is handled for my pop-ups so I am sticking with Window since it's basically just a dialog with already implemented Card, Optional pop-up features like minimize, and the Injection of Context is neat.

@durga-raj
Copy link

Just add below lines.. it's working for me.

let window = this.windowService.open(FamilyMemberFormComponent, {
title: Member,
hasBackdrop: true,
closeOnBackdropClick: false,
buttons: {
minimize: false,
maximize: false,
fullScreen: false,
close: true,
},
});

@khalifa005
Copy link

Fixed when minimizing window the component won't get destroyed.
had to override the nb window files
image
in window component.css
image

and in the component
image

too late but i had to do it and also updated ngx admin to work with angular 18 and also can work with angular matrial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants