mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Request History: Set dropdown value to the response instead of null (#2735)
Co-authored-by: Timothy Lim <tim.lim@intercom.io> Co-authored-by: Opender Singh <opender.singh@konghq.com>
This commit is contained in:
parent
c8926d75ae
commit
84fc8f38a7
@ -55,7 +55,7 @@ class ResponseHistoryDropdown extends PureComponent<Props> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
renderDropdownItem(response: Response, i: number) {
|
renderDropdownItem(response: Response) {
|
||||||
const { activeResponse, requestVersions } = this.props;
|
const { activeResponse, requestVersions } = this.props;
|
||||||
const activeResponseId = activeResponse ? activeResponse._id : 'n/a';
|
const activeResponseId = activeResponse ? activeResponse._id : 'n/a';
|
||||||
const active = response._id === activeResponseId;
|
const active = response._id === activeResponseId;
|
||||||
@ -68,7 +68,7 @@ class ResponseHistoryDropdown extends PureComponent<Props> {
|
|||||||
<DropdownItem
|
<DropdownItem
|
||||||
key={response._id}
|
key={response._id}
|
||||||
disabled={active}
|
disabled={active}
|
||||||
value={i === 0 ? null : response}
|
value={response}
|
||||||
onClick={this._handleSetActiveResponse}
|
onClick={this._handleSetActiveResponse}
|
||||||
>
|
>
|
||||||
{active ? <i className="fa fa-thumb-tack" /> : <i className="fa fa-empty" />}{' '}
|
{active ? <i className="fa fa-thumb-tack" /> : <i className="fa fa-empty" />}{' '}
|
||||||
|
Loading…
Reference in New Issue
Block a user