fix(spaces): stop module settings selects from polluting scope overrides
Module settings selects (notebook-id, select types) shared the .scope-select CSS class with actual data-scope selects, causing their values to be sent as scopeOverrides — triggering "Invalid scope '' for rnotes" on save. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
448b68eb62
commit
64f9603e39
|
|
@ -970,7 +970,7 @@ export class RStackSpaceSwitcher extends HTMLElement {
|
||||||
html += `
|
html += `
|
||||||
<div class="scope-row">
|
<div class="scope-row">
|
||||||
<span class="scope-label">Data scope:</span>
|
<span class="scope-label">Data scope:</span>
|
||||||
<select class="scope-select" data-mod-id="${m.id}">
|
<select class="scope-select data-scope-select" data-mod-id="${m.id}">
|
||||||
<option value="space" ${m.scoping.currentScope === "space" ? "selected" : ""}>Space</option>
|
<option value="space" ${m.scoping.currentScope === "space" ? "selected" : ""}>Space</option>
|
||||||
<option value="global" ${m.scoping.currentScope === "global" ? "selected" : ""}>Global</option>
|
<option value="global" ${m.scoping.currentScope === "global" ? "selected" : ""}>Global</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -1068,7 +1068,7 @@ export class RStackSpaceSwitcher extends HTMLElement {
|
||||||
|
|
||||||
// Collect scope overrides
|
// Collect scope overrides
|
||||||
const scopeOverrides: Record<string, string> = {};
|
const scopeOverrides: Record<string, string> = {};
|
||||||
container.querySelectorAll(".scope-select").forEach((sel) => {
|
container.querySelectorAll(".data-scope-select").forEach((sel) => {
|
||||||
const el = sel as HTMLSelectElement;
|
const el = sel as HTMLSelectElement;
|
||||||
scopeOverrides[el.dataset.modId!] = el.value;
|
scopeOverrides[el.dataset.modId!] = el.value;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue