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

Dialog default prop values #638

Closed
cagataycivici opened this issue Nov 12, 2018 · 3 comments
Closed

Dialog default prop values #638

cagataycivici opened this issue Nov 12, 2018 · 3 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@cagataycivici
Copy link
Member

Change the default of following props;

modal to true
draggable to false
resizable to false
blockScroll to true

As these are the most common use cases.

@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Nov 12, 2018
@cagataycivici cagataycivici added this to the 2.0.0-rc.1 milestone Nov 12, 2018
@cagataycivici cagataycivici self-assigned this Nov 12, 2018
@DanBoSlice
Copy link

This has been marked as completed but it looks like it has been reverted in the meantime. The defaults for draggable and resizable are true and blockScroll is false.
It would be great to have a way of configuring the defaults project-wide.

@melloware
Copy link
Member

I know this ticket is 4 years old but things have clearly changed over the years and it does look like the defaults have changed...

Dialog.defaultProps = {
    __TYPE: 'Dialog',
    appendTo: null,
    ariaCloseIconLabel: null,
    baseZIndex: 0,
    blockScroll: false,
    breakpoints: null,
    className: null,
    closable: true,
    closeOnEscape: true,
    contentClassName: null,
    contentStyle: null,
    dismissableMask: false,
    draggable: true,
    focusOnShow: true,
    footer: null,
    header: null,
    headerClassName: null,
    headerStyle: null,
    icons: null,
    id: null,
    keepInViewport: true,
    maskClassName: null,
    maskStyle: null,
    maximizable: false,
    maximized: false,
    minX: 0,
    minY: 0,
    modal: true,
    onClick: null,
    onDrag: null,
    onDragEnd: null,
    onDragStart: null,
    onHide: null,
    onMaskClick: null,
    onMaximize: null,
    onResize: null,
    onResizeEnd: null,
    onResizeStart: null,
    onShow: null,
    position: 'center',
    resizable: true,
    rtl: false,
    showHeader: true,
    style: null,
    transitionOptions: null,
    visible: false
};

@melloware
Copy link
Member

Also @DanBoSlice you can easily configure the Dialog by creating a simple wrapper component like DanBoSliceDialog that sets these by default right?

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

3 participants