schema selector is cached by conid and database

This commit is contained in:
SPRINX0\prochazka
2024-09-18 14:07:33 +02:00
parent 1f7b632553
commit 327d43096f
2 changed files with 6 additions and 0 deletions

View File

@@ -11,6 +11,8 @@
export let objectList;
export let onApplySelectedSchema;
export let valueStorageKey;
let appliedSchema;
$: {
@@ -46,6 +48,8 @@
function handleAddNewSchema() {
// runCommand('add-schema', { conid: dbinfo.conid, database: dbinfo.database });
}
$: selectedSchema = localStorage.getItem(valueStorageKey ?? '');
</script>
{#if schemaList.length > 0}
@@ -62,6 +66,7 @@
value={selectedSchema ?? appliedSchema ?? ''}
on:change={e => {
selectedSchema = e.detail;
localStorage.setItem(valueStorageKey, e.detail);
}}
selectClass="schema-select"
/>