Skip to content

Commit

Permalink
Fix: tags not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
gagansuie committed May 23, 2024
1 parent 37884b3 commit aa65039
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/components/Channel/Chat/DrawerEditChannel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
showAddCategory = false,
maxTag = 3,
maxCategory = 4,
imageSrc: string = '',
inputTags: HTMLInputElement
imageSrc: string = ''
$: maxTagLabel = channel?.tags.length == maxTag ? 'max reached' : 'max ' + maxTag
$: maxCategoryLabel =
channel?.category.length == maxCategory ? 'max reached' : 'max ' + maxCategory
onMount(async () => {
let inputTags = document.getElementById('tags')
inputTags?.setAttribute('maxlength', '20')
if (!$tags.length) {
const suggestedTags = await get(`tags`)
Expand Down Expand Up @@ -181,7 +181,7 @@
<Tags
bind:tags={channel.tags}
maxTags={maxTag}
bind:this={inputTags}
id="tags"
placeholder={channel.tags.length > 0 ? '' : 'Tag'} />
<span class="absolute right-0 top-1/2 text-gray-400 pr-3">({maxTagLabel})</span>
{#if channel.tags.length === 0}
Expand Down

0 comments on commit aa65039

Please sign in to comment.