Skip to content

Commit 76ba190

Browse files
committed
no data text can be deactivated
1 parent 4741a8c commit 76ba190

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<br>
2121
<h4>None</h4>
2222
<calendar-heatmap :values="[]" :end-date="endDate" :style="{'max-width': orientation === 'vertical' ? '145px' : '675px'}"
23-
:vertical="orientation === 'vertical'"/>
23+
:vertical="orientation === 'vertical'" :no-data-text="false"/>
2424
<br>
2525
<h4>Some</h4>
2626
<calendar-heatmap

src/components/CalendarHeatmap.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
default: false
155155
},
156156
noDataText : {
157-
type : String,
157+
type : [ Boolean, String ],
158158
default: null
159159
},
160160
round : {
@@ -213,7 +213,7 @@
213213
return `<b>${day.count} ${props.tooltipUnit}</b> ${lo.value.on} ${lo.value.months[ day.date.getMonth() ]} ${day.date.getDate()}, ${day.date.getFullYear()}`;
214214
} else if (props.noDataText) {
215215
return `${props.noDataText}`;
216-
} else {
216+
} else if (props.noDataText !== false) {
217217
return `<b>No ${props.tooltipUnit}</b> ${lo.value.on} ${lo.value.months[ day.date.getMonth() ]} ${day.date.getDate()}, ${day.date.getFullYear()}`;
218218
}
219219
}

0 commit comments

Comments
 (0)