wini-web-components 1.5.7 → 1.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -286,18 +286,18 @@ var Select1 = /** @class */ (function (_super) {
|
|
|
286
286
|
(_c = _this.inputRef.current) === null || _c === void 0 ? void 0 : _c.focus();
|
|
287
287
|
}
|
|
288
288
|
} },
|
|
289
|
-
|
|
289
|
+
(!_value || typeof _value.name === "string" || typeof _value.name === "number") ? react_1.default.createElement("input", { ref: this.inputRef, readOnly: this.props.readOnly, onChange: this.search, placeholder: this.props.placeholder, onKeyDown: this.onKeyDown, onBlur: function (ev) {
|
|
290
290
|
if (_this.state.onSelect && !_this.props.readOnly)
|
|
291
291
|
ev.target.focus();
|
|
292
292
|
else if (!_this.state.onSelect)
|
|
293
293
|
_this.setState(__assign(__assign({}, _this.state), { isOpen: false, onSelect: null }));
|
|
294
|
-
} }) : _value.name
|
|
294
|
+
} }) : _value.name,
|
|
295
295
|
this.props.showClearValueButton && _value ? react_1.default.createElement("button", { type: 'button', className: 'row', style: { padding: '0.4rem' }, onClick: function (ev) {
|
|
296
296
|
ev.stopPropagation();
|
|
297
297
|
if (_this.state.value)
|
|
298
298
|
_this.setState(__assign(__assign({}, _this.state), { isOpen: true, value: undefined }));
|
|
299
299
|
} },
|
|
300
|
-
react_1.default.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faXmarkCircle, style: { fontSize: '1.6rem', color: "var(--neutral-text-color-subtitle)" } })) : react_1.default.createElement("div", { className: 'row', style: { display: (this.containerRef.current
|
|
300
|
+
react_1.default.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faXmarkCircle, style: { fontSize: '1.6rem', color: "var(--neutral-text-color-subtitle)" } })) : react_1.default.createElement("div", { className: 'row', style: { display: (!this.containerRef.current || this.containerRef.current.getBoundingClientRect().width >= 120) ? "flex" : "none" } },
|
|
301
301
|
react_1.default.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: this.state.isOpen ? free_solid_svg_icons_1.faChevronUp : free_solid_svg_icons_1.faChevronDown, style: { fontSize: '1.1rem', color: "var(--neutral-text-color-subtitle)" } })),
|
|
302
302
|
this.state.isOpen &&
|
|
303
303
|
react_dom_1.default.createPortal(react_1.default.createElement("div", { className: "select1-popup col ".concat((_e = this.props.popupClassName) !== null && _e !== void 0 ? _e : ""), style: (_f = this.state.style) !== null && _f !== void 0 ? _f : {
|