Skip to content

Commit ede1965

Browse files
committed
Fix TypeError in item-picker on chart reload
Fixes: ``` smart-select-class.js:105 Uncaught TypeError: Cannot read properties of undefined (reading 'options') at HTMLInputElement.handleInputChange (smart-select-class.js:105:41) at HTMLDivElement.handleLiveEvent (dom7.module.js:320:48) ``` Signed-off-by: Florian Hotze <[email protected]>
1 parent 36dcc2f commit ede1965

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bundles/org.openhab.ui/web/src/pages/analyzer/analyzer.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@
3838
<f7-block class="no-margin no-padding" v-show="controlsTab === 'series'">
3939
<f7-row>
4040
<f7-col :width="100" />
41-
<f7-col :width="100" v-if="showChart">
41+
<!-- use v-show instead of v-if to keep the item-picker props valid while selecting Items and avoid TypeErrors -->
42+
<f7-col :width="100" v-show="showChart">
4243
<div class="card data-table">
4344
<div class="card-header no-padding" style="min-height: auto">
4445
<f7-list style="width: 100%">
4546
<item-picker :key="itemsPickerKey" title="Items" name="items-to-analyze" :value="itemNames" @input="updateItems" :multiple="true" />
4647
</f7-list>
4748
<!-- <div class="data-table-title">Options</div> -->
4849
</div>
49-
<div class="card-content">
50+
<div v-if="showChart" class="card-content">
5051
<table>
5152
<thead>
5253
<tr>

0 commit comments

Comments
 (0)