Skip to content

Commit 14703be

Browse files
committed
Trigger output refresh on option changes.
1 parent d4cae00 commit 14703be

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

playground/next/editor.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ window.app = createApp({
431431
this.setOutputTab(this.outputTab);
432432
},
433433
async setOutputTab(value) {
434-
if (!value || !this.doc) return;
434+
if (!this.doc) return;
435435
if (value) this.outputTab = value;
436436
let context = this.contextDoc;
437437
switch (this.outputTab) {

playground/next/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,21 +146,21 @@ <h2 class="ui massive header">JSON-LD Playground</h2>
146146
<div class="field">
147147
<div class="ui radio checkbox">
148148
<input type="radio" id="options-api-processingMode-default" name="processingMode" value="" checked
149-
v-model="options.processingMode">
149+
v-model="options.processingMode" @change="setOutputTab()">
150150
<label for="options-api-processingMode-default">Default</label>
151151
</div>
152152
</div>
153153
<div class="field">
154154
<div class="ui radio checkbox">
155155
<input type="radio" id="options-api-processingMode-1-0" name="processingMode" value="json-ld-1.0"
156-
v-model="options.processingMode">
156+
v-model="options.processingMode" @change="setOutputTab()">
157157
<label for="options-api-processingMode-1-0">JSON-LD 1.0</label>
158158
</div>
159159
</div>
160160
<div class="field">
161161
<div class="ui radio checkbox">
162162
<input type="radio" id="options-api-processingMode-1-1" name="processingMode" value="json-ld-1.1"
163-
v-model="options.processingMode">
163+
v-model="options.processingMode" @change="setOutputTab()">
164164
<label for="options-api-processingMode-1-1">JSON-LD 1.1</label>
165165
</div>
166166
</div>
@@ -170,7 +170,7 @@ <h2 class="ui massive header">JSON-LD Playground</h2>
170170
<label for="options-api-base" class="two wide field">Base</label>
171171
<div class="sixteen wide field">
172172
<input type="text" id="options-api-base-url" placeholder="URL"
173-
v-model="options.base">
173+
v-model="options.base" @change="setOutputTab()">
174174
</div>
175175
</div>
176176

@@ -179,7 +179,7 @@ <h2 class="ui massive header">JSON-LD Playground</h2>
179179
<div class="field">
180180
<div class="ui checkbox">
181181
<input type="checkbox" id="options-api-compactArrays"
182-
v-model="options.compactArrays">
182+
v-model="options.compactArrays" @change="setOutputTab()">
183183
<label for="options-api-compactArrays">Compact Arrays</label>
184184
</div>
185185
</div>
@@ -190,7 +190,7 @@ <h2 class="ui massive header">JSON-LD Playground</h2>
190190
<div class="field">
191191
<div class="ui checkbox">
192192
<input type="checkbox" id="options-api-compactToRelative"
193-
v-model="options.compactToRelative">
193+
v-model="options.compactToRelative" @change="setOutputTab()">
194194
<label for="options-api-compactToRelative">Compact To Relative</label>
195195
</div>
196196
</div>
@@ -202,14 +202,14 @@ <h2 class="ui massive header">JSON-LD Playground</h2>
202202
<div class="field">
203203
<div class="ui radio checkbox">
204204
<input type="radio" id="options-api-rdfDirection-default" name="rdfDirection" value="" checked
205-
v-model="options.rdfDirection">
205+
v-model="options.rdfDirection" @change="setOutputTab()">
206206
<label for="options-api-rdfDirection-default">Default (null)</label>
207207
</div>
208208
</div>
209209
<div class="field">
210210
<div class="ui radio checkbox">
211211
<input type="radio" id="options-api-rdfDirection-i18n-datatype" name="rdfDirection" value="i18n-datatype"
212-
v-model="options.rdfDirection">
212+
v-model="options.rdfDirection" @change="setOutputTab()">
213213
<label for="options-api-rdfDirection-i18n-datatype">"i18n-datatype"</label>
214214
</div>
215215
</div>
@@ -222,14 +222,14 @@ <h2 class="ui massive header">JSON-LD Playground</h2>
222222
<div class="field">
223223
<div class="ui radio checkbox">
224224
<input type="radio" id="options-api-safe-false" name="safe" :value="false"
225-
v-model="options.safe">
225+
v-model="options.safe" @change="setOutputTab()">
226226
<label for="options-api-safe-false">False</label>
227227
</div>
228228
</div>
229229
<div class="field">
230230
<div class="ui radio checkbox">
231231
<input type="radio" id="options-api-safe-true" name="safe" :value="true"
232-
v-model="options.safe">
232+
v-model="options.safe" @change="setOutputTab()">
233233
<label for="options-api-safe-true">True</label>
234234
</div>
235235
</div>

0 commit comments

Comments
 (0)