Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching a schema from the Manage Schema #1191

Merged
merged 15 commits into from
Mar 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
switch schema from Manage Schema
  • Loading branch information
A1O committed Mar 17, 2022
commit 3673df7d30f008ce82fd0b7795a51b6c40823555
10 changes: 8 additions & 2 deletions mathesar_ui/src/pages/schemas/schema-row/SchemaRow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
} from '@fortawesome/free-solid-svg-icons';
import { Icon, Button } from '@mathesar-component-library';
import type { SchemaEntry } from '@mathesar/App.d';
import { deleteSchema } from '@mathesar/stores/schemas';
import { currentSchemaId, deleteSchema } from '@mathesar/stores/schemas';
import { removeTablesInSchemaTablesStore } from '@mathesar/stores/tables';
import { confirmDelete } from '@mathesar/stores/confirmation';
import { currentDBName } from '@mathesar/stores/databases';
import { router } from 'tinro';

const dispatch = createEventDispatcher();

Expand All @@ -35,9 +36,14 @@
},
});
}

function handleSchemaSwitch() {
$currentSchemaId = schema.id;
router.goto(`/${$currentDBName}/${schema.id}`);
}
</script>

<div class="schema-row">
<div class="schema-row" on:click|self={handleSchemaSwitch}>
A1O marked this conversation as resolved.
Show resolved Hide resolved
<div class="details">
<div class="title">
<Icon data={faProjectDiagram} />
Expand Down