mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-27 17:19:42 -04:00
Fixed <Input> update bug
This commit is contained in:
1 parent
e657a094cf
commit
bf72c3e6ff
4 files changed
+13
-2
No files matched your search
@@ -67,7 +67,7 @@ class ResponsePane extends Component {
|
||||
|
||||
<header className="pane__header"></header>
|
||||
<div className="pane__body pane__body--placeholder text-center pad">
|
||||
<h1>Nothing Yet...</h1>
|
||||
<h1>No responses yet...</h1>
|
||||
<p>Click the <em>Send</em> button to trigger a request</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -48,8 +48,16 @@ class Input extends Component {
|
||||
}
|
||||
|
||||
shouldComponentUpdate (nextProps) {
|
||||
if (nextProps.type !== this.props.type) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Only update when we have to, or else the cursor will jump to the end.
|
||||
return this.refs.input.value !== nextProps.value;
|
||||
if (this.refs.input.value !== nextProps.value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
focus () {
|
||||
|
||||
@@ -37,10 +37,12 @@
|
||||
|
||||
h1 {
|
||||
color: $hl;
|
||||
font-size: $font-size-xxl;
|
||||
}
|
||||
|
||||
p {
|
||||
color: $hl-xxl;
|
||||
font-size: $font-size-md;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ $font-size-md: 1.0rem;
|
||||
$font-size-lg: 1.1rem;
|
||||
$font-size-xl: 1.3rem;
|
||||
$font-size-xxl: 1.6rem;
|
||||
$font-size-xxxl: 1.8rem;
|
||||
|
||||
/* Wrapper */
|
||||
$line-height-md: 4rem;
|
||||
|
||||
Reference in new issue
Block a user