fix: library tabs now switch content — single Alpine scope
Bug: two separate x-data='{ tab }' scopes (one on tabs, one on table)
→ clicking tabs changed tab in first scope, x-show looked at second scope
Fix: single x-data wrapper around both tabs and table divs
This commit is contained in:
@@ -10,8 +10,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Library tabs -->
|
||||
<div class="view-tabs" x-data="{ tab: 'recents' }">
|
||||
<!-- Library tabs + table — single Alpine scope -->
|
||||
<div x-data="{ tab: 'recents' }">
|
||||
|
||||
<div class="view-tabs">
|
||||
<button class="view-tab" :class="{ active: tab === 'recents' }" @click="tab = 'recents'">
|
||||
<span class="tab-icon">🕒</span> Recents
|
||||
</button>
|
||||
@@ -40,7 +42,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Table -->
|
||||
<div x-data="{ tab: 'recents' }" style="padding: 0 24px;">
|
||||
<div style="padding: 0 24px;">
|
||||
<!-- Column headers -->
|
||||
<div class="library-table-header">
|
||||
<span class="lib-col lib-col-name">📄 Page name</span>
|
||||
@@ -110,6 +112,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
|
||||
Reference in New Issue
Block a user