Skip to content

Commit 9dea046

Browse files
committed
Simplify and fix table tab toggling.
Once the table tab was clicked it would stay there...because it was checking for data availability...not UX state.
1 parent fff5ede commit 9dea046

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

playground/next/editor.bundle.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35324,9 +35324,6 @@
3532435324
}
3532535325
return '';
3532635326
},
35327-
get hasTableQuads() {
35328-
return Object.keys(this.tableQuads).length > 0;
35329-
},
3533035327
get sideDoc() {
3533135328
if (this.outputTab === 'framed') {
3533235329
return 'frameDoc';

playground/next/editor.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ window.app = createApp({
167167
}
168168
return '';
169169
},
170-
get hasTableQuads() {
171-
return Object.keys(this.tableQuads).length > 0;
172-
},
173170
get sideDoc() {
174171
if (this.outputTab === 'framed') {
175172
return 'frameDoc';

playground/next/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ <h2 class="ui massive header">JSON-LD Playground</h2>
277277
<div :class="{ active: outputTab == 'yamlld' }" class="item" @click="setOutputTab('yamlld')"><i class="th icon"></i> YAML-LD</div>
278278
</div>
279279
<div class="ui fitted resizable scrolling active bottom attached tab segment">
280-
<div v-show="!hasTableQuads" id="read-only-editor"><!-- replaced by CodeMirror --></div>
281-
<table class="ui very padded table" v-show="hasTableQuads">
280+
<div v-show="outputTab != 'table'" id="read-only-editor"><!-- replaced by CodeMirror --></div>
281+
<table class="ui very padded table" v-show="outputTab == 'table'">
282282
<thead>
283283
<tr>
284284
<th>Subject</th>

0 commit comments

Comments
 (0)