Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: tags input not taking advantage of available width #1055

Merged
merged 5 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions demo/sections/components/Tags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{ title: 'Multiple' },
{ title: 'Using p-tag-wrapper' },
]"
use-resizable
>
<template #basic>
<div class="tags__list">
Expand Down Expand Up @@ -34,9 +35,9 @@

<template #using-p-tag-wrapper>
<div class="flex flex-col gap-3">
<p-tag-wrapper class="h-[48px]" :tags="numberArr" justify="left" />
<p-tag-wrapper :tags="numberArr" justify="left" />

<p-tag-wrapper class="h-[48px]" :tags="numberArr">
<p-tag-wrapper :tags="numberArr">
<template #tag="{ tag }">
<p-tag icon="Prefect">
{{ tag }}
Expand All @@ -50,11 +51,18 @@
</template>
</p-tag-wrapper>

<p-tag-wrapper class="h-[48px]" justify="right">
<p-tag-wrapper justify="right">
<p-tag v-for="i in 20" :key="i">
Tag {{ i }}
</p-tag>
</p-tag-wrapper>

<div>
<p>Inline</p>
<div class="border border-default p-2 max-w-full">
<p-tag-wrapper :tags="numberArr" justify="left" inline class="border border-default" />
</div>
</div>
</div>
</template>
</ComponentPage>
Expand Down
2 changes: 1 addition & 1 deletion demo/sections/components/TagsInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<template #tags-input>
<div class="tags-input__demo">
<p-tags-input v-model="exampleTagsValue" :disabled="disabled" :state="exampleState" />
<p-tags-input v-model="exampleTagsValue" empty-message="All tags" :disabled="disabled" :state="exampleState" />

<p-code inline>
value: {{ JSON.stringify(exampleTagsValue) }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Select/PSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</template>

<template v-else-if="multiple">
<PTagWrapper :tags="tags">
<PTagWrapper :tags="tags" inline>
<template #tag="{ tag }">
<slot name="tag" :label="tag.label" :value="tag.value" :dismiss="() => dismissTag(tag)">
<PTag :dismissible="isDismissible(tag)" @dismiss="dismissTag(tag)">
Expand Down
Loading
Loading