This commit is contained in:
Mirco Wittrien 2019-11-15 12:54:50 +01:00
parent 7c6900bdce
commit 8c8324df4d
2 changed files with 6 additions and 9 deletions

View File

@ -7048,14 +7048,13 @@ var BDFDB = {
let childcomponent = LibraryComponents[this.props.type]; let childcomponent = LibraryComponents[this.props.type];
if (!childcomponent) return null; if (!childcomponent) return null;
if (this.props.mini && childcomponent.Sizes) this.props.size = childcomponent.Sizes.MINI || childcomponent.Sizes.MIN; if (this.props.mini && childcomponent.Sizes) this.props.size = childcomponent.Sizes.MINI || childcomponent.Sizes.MIN;
let childprops = BDFDB.ObjectUtils.exclude(Object.assign(BDFDB.ObjectUtils.exclude(this.props, "className", "id", "type"), this.props.childProps, {
onChange: this.handleChange.bind(this)
}), "basis", "dividerbottom", "dividertop", "label", "labelchildren", "mini", "note", "childProps");
return BDFDB.ReactUtils.createElement(LibraryComponents.Flex, { return BDFDB.ReactUtils.createElement(LibraryComponents.Flex, {
className: BDFDB.DOMUtils.formatClassName(this.props.className, this.props.disabled && BDFDB.disCN.disabled), className: BDFDB.DOMUtils.formatClassName(this.props.className, this.props.disabled && BDFDB.disCN.disabled),
id: this.props.id, id: this.props.id,
direction: LibraryComponents.Flex.Direction.VERTICAL, direction: LibraryComponents.Flex.Direction.VERTICAL,
align: LibraryComponents.Flex.Align.STRETCH, align: LibraryComponents.Flex.Align.STRETCH,
grow: this.props.grow,
stretch: this.props.stretch,
children: [ children: [
this.props.dividertop ? BDFDB.ReactUtils.createElement(LibraryComponents.FormComponents.FormDivider, { this.props.dividertop ? BDFDB.ReactUtils.createElement(LibraryComponents.FormComponents.FormDivider, {
className: this.props.mini ? BDFDB.disCN.marginbottom8 : BDFDB.disCN.marginbottom20 className: this.props.mini ? BDFDB.disCN.marginbottom8 : BDFDB.disCN.marginbottom20
@ -7075,7 +7074,7 @@ var BDFDB = {
shrink: this.props.basis ? 0 : 1, shrink: this.props.basis ? 0 : 1,
basis: this.props.basis, basis: this.props.basis,
wrap: true, wrap: true,
children: BDFDB.ReactUtils.createElement(childcomponent, childprops) children: BDFDB.ReactUtils.createElement(childcomponent, BDFDB.ObjectUtils.exclude(Object.assign(BDFDB.ObjectUtils.exclude(this.props, "className", "id", "type"), this.props.childProps, {onChange: this.handleChange.bind(this)}), "grow", "stretch", "basis", "dividerbottom", "dividertop", "label", "labelchildren", "mini", "note", "childProps"))
}) })
].flat().filter(n => n) ].flat().filter(n => n)
}), }),
@ -7127,11 +7126,9 @@ var BDFDB = {
} }
render() { render() {
if (typeof this.props.type != "string" || !["SELECT", "SWITCH", "TEXTINPUT"].includes(this.props.type.toUpperCase())) return null; if (typeof this.props.type != "string" || !["SELECT", "SWITCH", "TEXTINPUT"].includes(this.props.type.toUpperCase())) return null;
let props = Object.assign({}, this.props, { return BDFDB.ReactUtils.createElement(LibraryComponents.SettingsItem, BDFDB.ObjectUtils.exclude(Object.assign({}, this.props, {
onChange: this.saveSettings.bind(this) onChange: this.saveSettings.bind(this)
}); }), "keys", "plugin"));
BDFDB.ObjectUtils.delete(props, "keys", "plugin");
return BDFDB.ReactUtils.createElement(LibraryComponents.SettingsItem, props);
} }
}; };

File diff suppressed because one or more lines are too long