Skip to content

Doesn't work correctly when there is block element in after slot #35

Open
@lana-k

Description

@lana-k

I need a clamped text with 'read more' button displayed as block element (like this)

So, when I use block element in after slot the vue-clamp hides more lines than needed.

    <v-clamp
      :max-lines="3"
      autoresize
    >
      {{ text }}
      <template #after="{ toggle, expanded, clamped }">
        <div
          v-if="expanded || clamped"
          class="toggle btn btn-sm"
          @click="toggle"
        >
          Read more
        </div>
      </template>
    </v-clamp>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions