0

I have the follwing:

<Panel header="SITE MANAGEMENT">
    <template #icons>
      <Button severity="secondary" rounded text @click="showAddNewModal = true">
      <template #icon>
        <LucideIcon name="Plus" />
      </template>
      </Button>
      <Button severity="secondary" rounded text @click="loadSites">
        <template #icon>
          <LucideIcon name="RefreshCw" />
        </template>
      </Button>
    </template>
    
    <DataTable ref="dataTable" :value="tableData" paginator :rows="50" :loading="loadingSiteData">
      <Column field="siteName" header="Name" />
      <Column field="siteIdentifier" header="Identifier" />
      <Column field="averageScanAccuracyForCurrentMonth" header="Scan Accuracy">
        <template #body="slotProps">
          {{ slotProps.data.averageScanAccuracyForCurrentMonth }}%
        </template>
      </Column>
      <Column header="Actions" headerClass="flex justify-end">
        <template #body="slotProps">
          <div class="flex justify-end">
            <Button severity="danger" rounded text @click="deleteRecord(slotProps.data)">
            <template #icon>
              <LucideIcon name="Trash2" />
            </template>
            </Button>
          </div>
        </template>
      </Column>
      <template #empty>
        <NoDataInTableComponent />
      </template>
    </DataTable>
  </Panel>

When I try it on Mobile size screens, I get:

enter image description here

Even if i add "scrollable", it wont give me horizontal scrollers for the DataTable. How can I solve this?

2
  • And where is the reproducible example of the problem? Commented Oct 28 at 20:35
  • Most likely you need to adjust the styles of parent and limit its width or something. Panel might have conflicting styles, maybe try throwing another div with display: flex in between. Commented Oct 29 at 9:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.