Skip to content

Breakpoint in DataTable #7628

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

Open
PerryProjects opened this issue Apr 21, 2025 · 0 comments
Open

Breakpoint in DataTable #7628

PerryProjects opened this issue Apr 21, 2025 · 0 comments

Comments

@PerryProjects
Copy link

I'm trying to use breakpoints in the DataTable. I believe it used to work with responsiveLayout, but that option no longer appears in the documentation. Apparently, only horizontal scrolling is supported now for mobile or responsive layouts.

I'm using primevue 4 in Hybrid Mode with TailwindCss 4.

Is there any chance i get cards on mobile or must i style it by myself?

in the following my table:

<template>
    <div class="px-4 ">
        <DataTable
            :value="teamList!"
            striped-rows
            :loading="isLoading"
            breakpoint="1200px"
        >
            <Column
                field="hasPaid"
                header="Hat bezahlt?"
            >
                <template #body="{ data }: { data: ListTeam }">
                    <Tag
                        v-if="data.costsPaid === 0"
                        severity="danger"
                        value="Nicht bezahlt"
                    />
                    <Tag
                        v-else-if="data.costsPaid > 0 && data.costsPaid < data.costsDue"
                        severity="warn"
                        value="Teilweise bezahlt"
                    />
                    <Tag
                        v-else-if="data.costsPaid === data.costsDue"
                        severity="success"
                        value="Bezahlt"
                    />
                    <Tag
                        v-else
                        severity="info"
                        value="Überbezahlt"
                    />
                </template>
            </Column>
            <Column
                field="name"
                header="Teamname"
            />
            <Column
                field="memberCount"
                header="Anzahl Spieler"
            >
                <template #body="{ data, field }">
                    {{ data[field as string] }}
                </template>
            </Column>
        </DataTable>
    </div>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant