This commit is contained in:
Mirco Wittrien 2019-11-10 19:11:53 +01:00
parent 3976189403
commit 68997f3c3e
2 changed files with 6 additions and 2 deletions

View File

@ -6199,11 +6199,15 @@ var BDFDB = {
let length = this.props.parsing ? BDFDB.StringUtils.getParsedLength(string) : string.length;
let select = end - start == 0 ? 0 : (this.props.parsing ? BDFDB.StringUtils.getParsedLength(string.slice(start, end)) : (end - start));
select = !select ? 0 : (select > length ? length - (length - end - start) : select);
return [
let children = [
typeof this.props.renderPrefix == "function" && this.props.renderPrefix(length),
`${length}${!this.props.max ? "" : "/" + this.props.max}${!select ? "" : " (" + select + ")"}`,
typeof this.props.renderSuffix == "function" && this.props.renderSuffix(length)
].filter(n => n);
return children.length == 1 ? children : BDFDB.ReactUtils.createElement(LibraryComponents.Flex, {
align: LibraryComponents.Flex.Align.CENTER,
children: children
});
}
updateCounter() {
if (!this.refElement) return;

File diff suppressed because one or more lines are too long