mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-24 23:59:16 -04:00
Fixed quick switcher workspaces not showing
This commit is contained in:
1 parent
99c411dc79
commit
ff596604b8
3 files changed
+5
-6
No files matched your search
@@ -303,6 +303,7 @@ class Wrapper extends Component {
|
||||
/>
|
||||
<RequestSwitcherModal
|
||||
ref={registerModal}
|
||||
workspaces={workspaces}
|
||||
workspaceChildren={workspaceChildren}
|
||||
workspaceId={activeWorkspace._id}
|
||||
activeRequestParentId={activeRequest ? activeRequest.parentId : activeWorkspace._id}
|
||||
|
||||
@@ -85,14 +85,11 @@ class RequestSwitcherModal extends Component {
|
||||
}
|
||||
|
||||
async _handleChange (searchString) {
|
||||
const {workspaceChildren} = this.props;
|
||||
const {workspaceChildren, workspaces} = this.props;
|
||||
const {workspaceId, activeRequestParentId} = this.props;
|
||||
|
||||
const requests = workspaceChildren.filter(d => d.type === models.request.type);
|
||||
const workspaces = workspaceChildren.filter(d => d.type === models.workspace.type);
|
||||
|
||||
// OPTIMIZATION: This only filters if we have a filter
|
||||
let matchedRequests = requests;
|
||||
let matchedRequests = workspaceChildren.filter(d => d.type === models.request.type);
|
||||
if (searchString) {
|
||||
matchedRequests = matchedRequests.filter(r => {
|
||||
const name = r.name.toLowerCase();
|
||||
@@ -277,6 +274,7 @@ RequestSwitcherModal.propTypes = {
|
||||
workspaceId: PropTypes.string.isRequired,
|
||||
activeRequestParentId: PropTypes.string.isRequired,
|
||||
workspaceChildren: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
workspaces: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
};
|
||||
|
||||
export default RequestSwitcherModal;
|
||||
@@ -130,7 +130,7 @@ body {
|
||||
--color-surprise: #c5bbff;
|
||||
--color-info: #75ddff;
|
||||
|
||||
--color-bg: #6d62c0;
|
||||
--color-bg: #695eb8;
|
||||
--color-font: #fff;
|
||||
|
||||
--hl-xxs: rgba(207, 190, 255, 0.05);
|
||||
|
||||
Reference in new issue
Block a user