fix(blocksAntd): Remove open property from Modal and Drawer.

This commit is contained in:
Gervwyk 2021-02-10 10:27:46 +02:00
parent 30b69dd3c0
commit e5954fffc7
5 changed files with 2 additions and 16 deletions

View File

@ -45,7 +45,3 @@
type: Drawer
properties:
keyboard: false
# - id: "properties.open: true"
# type: Drawer
# properties:
# open: true

View File

@ -48,7 +48,7 @@ const DrawerBlock = ({ blockId, content, properties, methods, rename, onClose })
mask={properties.mask}
maskClosable={properties.maskClosable}
title={properties.title}
visible={type.isBoolean(properties.open) ? properties.open : openState}
visible={openState}
width={properties.width}
height={properties.height}
zIndex={properties.zIndex}

View File

@ -25,11 +25,6 @@
"default": true,
"description": "Whether a close (x) button is visible on top right of the Drawer dialog or not."
},
"open": {
"type": "boolean",
"default": false,
"description": "Whether the Drawer dialog is open or not."
},
"mask": {
"type": "boolean",
"default": true,

View File

@ -52,7 +52,7 @@ const ModalBlock = ({ blockId, content, properties, events, methods }) => {
id={`${blockId}_modal`}
title={properties.title}
bodyStyle={methods.makeCssClass(properties.bodyStyle, { styleObjectOnly: true })}
visible={type.isBoolean(properties.open) ? properties.open : openState}
visible={openState}
onOk={async () => {
await methods.triggerEvent({ name: 'onOk' });
// the visible should only close if actions finished successfully

View File

@ -63,11 +63,6 @@
"default": true,
"description": "Whether to close the modal dialog when the mask (area outside the modal) is clicked."
},
"open": {
"type": "boolean",
"default": false,
"description": "Set the modal as open or closed using a property instead of actions."
},
"okText": {
"type": "string",
"default": "Ok",