Fix panel header icon behavior for new custorder

had to work around a buefy bug..?
This commit is contained in:
Lance Edgar 2023-01-11 16:02:35 -06:00
parent b8389c72bb
commit 2c7f2c0fcd

View file

@ -65,21 +65,30 @@
<b-collapse class="panel" :class="customerPanelType" <b-collapse class="panel" :class="customerPanelType"
:open.sync="customerPanelOpen"> :open.sync="customerPanelOpen">
<div slot="trigger" <template #trigger="props">
slot-scope="props" <div class="panel-heading"
class="panel-heading"
role="button"> role="button">
<b-icon pack="fas"
## TODO: this icon toggling should work, according to ## TODO: for some reason buefy will "reuse" the icon
## Buefy docs, but i could not ever get it to work. ## element in such a way that its display does not
## what am i missing? ## refresh. so to work around that, we use different
## https://buefy.org/documentation/collapse/ ## structure for the two icons, so buefy is forced to
## :icon="props.open ? 'caret-down' : 'caret-right'"> ## re-draw
## (for now we just always show caret-right instead)
icon="caret-right"> <b-icon v-if="props.open"
pack="fas"
icon="angle-down">
</b-icon> </b-icon>
<span v-if="!props.open">
<b-icon pack="fas"
icon="angle-right">
</b-icon>
</span>
<strong v-html="customerPanelHeader"></strong> <strong v-html="customerPanelHeader"></strong>
</div> </div>
</template>
<div class="panel-block"> <div class="panel-block">
<div style="width: 100%;"> <div style="width: 100%;">
@ -460,21 +469,30 @@
<b-collapse class="panel" <b-collapse class="panel"
open> open>
<div slot="trigger" <template #trigger="props">
slot-scope="props" <div class="panel-heading"
class="panel-heading"
role="button"> role="button">
<b-icon pack="fas"
## TODO: this icon toggling should work, according to ## TODO: for some reason buefy will "reuse" the icon
## Buefy docs, but i could not ever get it to work. ## element in such a way that its display does not
## what am i missing? ## refresh. so to work around that, we use different
## https://buefy.org/documentation/collapse/ ## structure for the two icons, so buefy is forced to
## :icon="props.open ? 'caret-down' : 'caret-right'"> ## re-draw
## (for now we just always show caret-right instead)
icon="caret-right"> <b-icon v-if="props.open"
pack="fas"
icon="angle-down">
</b-icon> </b-icon>
<span v-if="!props.open">
<b-icon pack="fas"
icon="angle-right">
</b-icon>
</span>
<strong v-html="itemsPanelHeader"></strong> <strong v-html="itemsPanelHeader"></strong>
</div> </div>
</template>
<div class="panel-block"> <div class="panel-block">
<div> <div>