Skip to content

Commit 26a5ab0

Browse files
committed
fix(NcChip): do not rerender slots to check if they are available
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 9431eed commit 26a5ab0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/NcChip/NcChip.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,24 +171,24 @@ const slots = defineSlots<{
171171
/**
172172
* The actions slot can be used to add custom actions (`NcAction*`) to the chips actions.
173173
*/
174-
actions: Slot
174+
actions?: Slot
175175

176176
/**
177177
* The default slot can be used to set the text that is shown.
178178
*/
179-
default: Slot
179+
default?: Slot
180180

181181
/**
182182
* The icon slot can be used to set the chip icon.
183183
* Make sure that the icon is not exceeding a height of `--chip-size`.
184184
* For round icons a exact size of `var(--chip-size)` is recommended.
185185
*/
186-
icon: Slot
186+
icon?: Slot
187187
}>()
188188

189189
const canClose = computed(() => !props.noClose)
190-
const hasActions = () => Boolean(slots.actions?.())
191-
const hasIcon = () => Boolean(props.iconPath || props.iconSvg || !!slots.icon?.())
190+
const hasActions = () => !!slots.actions
191+
const hasIcon = () => Boolean(props.iconPath || props.iconSvg || !!slots.icon)
192192
</script>
193193

194194
<style scoped lang="scss">

0 commit comments

Comments
 (0)