Medim
Medim
Explore posts from servers
NNuxt
Created by Medim on 1/29/2025 in #❓・help
Clearable <USelectMenu>
How can I make a sort of clearable menu? I did it like this using a <UIcon> but it's so unreliable its all janky and doesn't work properly
<USelectMenu
icon="i-mingcute-suitcase-line"
:loading="statusCompanies === 'pending'"
clear-search-on-close
option-attribute="name"
v-model="selectedCompanyId"
value-attribute="id"
:options="companies"
searchable
searchable-placeholder="Filtrar empresa..."
label="Filtrar por empresa"
class="w-56"
>
<template #trailing>
<UIcon
v-if="selectedCompanyId"
color="primary"
class="h-5 w-5"
@click.stop="() => (selectedCompanyId = '')"
name="i-mingcute-close-circle-line"
></UIcon>
</template>
</USelectMenu>
<USelectMenu
icon="i-mingcute-suitcase-line"
:loading="statusCompanies === 'pending'"
clear-search-on-close
option-attribute="name"
v-model="selectedCompanyId"
value-attribute="id"
:options="companies"
searchable
searchable-placeholder="Filtrar empresa..."
label="Filtrar por empresa"
class="w-56"
>
<template #trailing>
<UIcon
v-if="selectedCompanyId"
color="primary"
class="h-5 w-5"
@click.stop="() => (selectedCompanyId = '')"
name="i-mingcute-close-circle-line"
></UIcon>
</template>
</USelectMenu>
14 replies
NNuxt
Created by Medim on 1/27/2025 in #❓・help
Fixed column width in Nuxt UI UTable
Can we set it? I'm getting some layout shift while paginating cause some values are more extensive than others
18 replies
NNuxt
Created by Medim on 1/23/2025 in #❓・help
UAuthForm autocomplete warning
No description
6 replies
NNuxt
Created by Medim on 11/27/2024 in #❓・help
nuxtr not showing dependency version popup
No errors in console
5 replies
NNuxt
Created by Medim on 5/7/2024 in #❓・help
Encoding a bit off on createError?
No description
38 replies
NNuxt
Created by Medim on 5/1/2024 in #❓・help
Use prisma globally in api routes
I have a question, is it possible to use the prisma client globally without having to import it everytime? I'm using Prisma + Turso so there's a bit more than just two lines of code to use the prisma client so adding it to every api file is a bit tiring, is there a way to make it available as a util/helper globally? what is the best way to do it?
import { PrismaClient } from "@prisma/client"
const libsql = createClient({
url: `${tursoDatabaseUrl}`,
authToken: `${tursoAuthToken}`,
})

const adapter = new PrismaLibSQL(libsql)
const prisma = new PrismaClient({ adapter })
import { PrismaClient } from "@prisma/client"
const libsql = createClient({
url: `${tursoDatabaseUrl}`,
authToken: `${tursoAuthToken}`,
})

const adapter = new PrismaLibSQL(libsql)
const prisma = new PrismaClient({ adapter })
4 replies
NNuxt
Created by Medim on 4/12/2024 in #❓・help
Using a custom font results in a large blank space beneath placeholders
No description
2 replies
NNuxt
Created by Medim on 4/11/2024 in #❓・help
How can I setup this font using nuxt/fonts
No description
8 replies
NNuxt
Created by Medim on 4/6/2024 in #❓・help
Nuxtr always fails to update dependencies
If I use Nuxtr to update a dependency, it will fail. But If I click on "Install Manually" it goes through without a problem, what could it be? I'm using Yarn 4.0 and its specified on package.json
1 replies
NNuxt
Created by Medim on 2/20/2024 in #❓・help
Can't find auto import in slug route
No description
12 replies
NNuxt
Created by Medim on 12/9/2022 in #❓・help
When to use composables
quick question, when to use composables? In my project im creating an axios instance in a composable, is it correct?
1 replies
NNuxt
Created by Medim on 12/2/2022 in #❓・help
Nuxt 3 not importing component on subfolder
No description
3 replies
NNuxt
Created by Medim on 12/1/2022 in #❓・help
CSS not importing on vuetify plugin.
No description
4 replies