diff options
Diffstat (limited to 'public/bundle.js')
| -rw-r--r-- | public/bundle.js | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/public/bundle.js b/public/bundle.js index 6a5d949..d012595 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -2480,7 +2480,7 @@ var FileRow = exports.FileRow = function FileRow(props) { ) : linkFiles && file.url ? (0, _preact.h)( 'a', { target: '_blank', onClick: function onClick(e) { - if (!(e.metaKey || e.ctrlKey || e.altKey)) { + if (!(e.metaKey || e.ctrlKey || e.altKey) && _onClick) { e.preventDefault();_onClick && _onClick(file, e); } }, href: file.url }, @@ -3722,6 +3722,7 @@ var TextInput = function (_Component) { var _this = _possibleConstructorReturn(this, (TextInput.__proto__ || Object.getPrototypeOf(TextInput)).call(this, props)); + _this.state = { value: null, changed: false }; _this.handleInput = _this.handleInput.bind(_this); _this.handleKeydown = _this.handleKeydown.bind(_this); return _this; @@ -3730,12 +3731,20 @@ var TextInput = function (_Component) { _createClass(TextInput, [{ key: 'handleInput', value: function handleInput(e) { + this.setState({ + value: e.target.value, + changed: true + }); this.props.onInput && this.props.onInput(e.target.value); } }, { key: 'handleKeydown', value: function handleKeydown(e) { if (e.keyCode === 13) { + this.setState({ + value: e.target.value, + changed: false + }); this.props.onSave && this.props.onSave(e.target.value); } } @@ -3755,7 +3764,7 @@ var TextInput = function (_Component) { ), (0, _preact.h)('input', { type: 'text', - value: this.props.value, + value: this.state.changed ? this.state.value : this.props.value, onInput: this.handleInput, onKeydown: this.handleKeydown, placeholder: this.props.placeholder, @@ -9162,13 +9171,7 @@ var Pix2pixHDResults = function (_Component) { linkFiles: true, files: files, orderBy: 'date desc', - fields: 'name date size', - onClick: function onClick(file, e) { - e.preventDefault(); - e.stopPropagation(); - console.log('picked a result', file); - _this2.handlePick(file); - } + fields: 'name date size' }), (0, _preact.h)( 'h3', |
