Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2020-10-31 11:12:54 +01:00
parent dc2e8c9ce2
commit 3deb01a221
1 changed files with 3 additions and 1 deletions

View File

@ -5826,6 +5826,7 @@ module.exports = (_ => {
if (typeof this.props.onChange) this.props.onChange(this.props.items, this);
}
render() {
if (!BDFDB.ArrayUtils.is(this.props.items)) this.props.items = [];
return BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.MultiInput, BDFDB.ObjectUtils.exclude(Object.assign({}, this.props, {
className: BDFDB.disCN.inputlist,
innerClassName: BDFDB.disCN.inputlistitems,
@ -5840,7 +5841,7 @@ module.exports = (_ => {
}
}
},
children: (BDFDB.ArrayUtils.is(this.props.items) ? this.props.items : []).map(item => BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Badges.TextBadge, {
children: this.props.items.map(item => BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Badges.TextBadge, {
className: BDFDB.disCN.inputlistitem,
color: BDFDB.DiscordConstants.Colors.BRAND,
style: {borderRadius: "3px"},
@ -7052,6 +7053,7 @@ module.exports = (_ => {
onMouseEnter: this.handleMouseEnter.bind(this),
onMouseLeave: this.handleMouseLeave.bind(this),
maxLength: this.props.type == "file" ? false : this.props.maxLength,
style: this.props.width ? {width: `${this.props.width}px`} : {},
ref: this.props.inputRef
}), "errorMessage", "focused", "error", "success", "inputClassName", "inputChildren", "valuePrefix", "inputPrefix", "size", "editable", "inputRef", "style", "mode", "noAlpha", "filter", "useFilePath", "searchFolders")),
this.props.inputChildren,