Add selection
parent
5ffd624047
commit
e9015d4db6
|
@ -915,6 +915,7 @@ export default {
|
||||||
<template v-pre>
|
<template v-pre>
|
||||||
<DataTable :value="cars" :paginator="true" :rows="10" :filters.sync="filters" :resizableColumns="true"
|
<DataTable :value="cars" :paginator="true" :rows="10" :filters.sync="filters" :resizableColumns="true"
|
||||||
stateStorage="session" stateKey="dt-state-demo-session">
|
stateStorage="session" stateKey="dt-state-demo-session">
|
||||||
|
:selection.sync="selectedCar" selectionMode="single" dataKey="vin"
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<i class="pi pi-search" style="margin: 4px 4px 0px 0px;"></i>
|
<i class="pi pi-search" style="margin: 4px 4px 0px 0px;"></i>
|
||||||
|
@ -984,6 +985,7 @@ export default {
|
||||||
{name: 'Orange', value: 'Orange'},
|
{name: 'Orange', value: 'Orange'},
|
||||||
{name: 'Blue', value: 'Blue'}
|
{name: 'Blue', value: 'Blue'}
|
||||||
],
|
],
|
||||||
|
selectedCar: null,
|
||||||
cars: null
|
cars: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<div class="content-section implementation">
|
<div class="content-section implementation">
|
||||||
<h3>Session Storage</h3>
|
<h3>Session Storage</h3>
|
||||||
<DataTable :value="cars" :paginator="true" :rows="10" :filters.sync="filters" :resizableColumns="true"
|
<DataTable :value="cars" :paginator="true" :rows="10" :filters.sync="filters" :resizableColumns="true"
|
||||||
|
:selection.sync="selectedCar1" selectionMode="single" dataKey="vin"
|
||||||
stateStorage="session" stateKey="dt-state-demo-session">
|
stateStorage="session" stateKey="dt-state-demo-session">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
|
@ -53,6 +54,7 @@
|
||||||
|
|
||||||
<h3>Local Storage</h3>
|
<h3>Local Storage</h3>
|
||||||
<DataTable :value="cars" :paginator="true" :rows="10" :filters.sync="filters" :resizableColumns="true"
|
<DataTable :value="cars" :paginator="true" :rows="10" :filters.sync="filters" :resizableColumns="true"
|
||||||
|
:selection.sync="selectedCar2" selectionMode="single" dataKey="vin"
|
||||||
stateStorage="local" stateKey="dt-state-demo-local">
|
stateStorage="local" stateKey="dt-state-demo-local">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
|
@ -100,6 +102,7 @@
|
||||||
<template v-pre>
|
<template v-pre>
|
||||||
<h3>Session Storage</h3>
|
<h3>Session Storage</h3>
|
||||||
<DataTable :value="cars" :paginator="true" :rows="10" :filters.sync="filters" :resizableColumns="true"
|
<DataTable :value="cars" :paginator="true" :rows="10" :filters.sync="filters" :resizableColumns="true"
|
||||||
|
:selection.sync="selectedCar1" selectionMode="single" dataKey="vin"
|
||||||
stateStorage="session" stateKey="dt-state-demo-session">
|
stateStorage="session" stateKey="dt-state-demo-session">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
|
@ -141,6 +144,7 @@
|
||||||
|
|
||||||
<h3>Local Storage</h3>
|
<h3>Local Storage</h3>
|
||||||
<DataTable :value="cars" :paginator="true" :rows="10" :filters.sync="filters" :resizableColumns="true"
|
<DataTable :value="cars" :paginator="true" :rows="10" :filters.sync="filters" :resizableColumns="true"
|
||||||
|
:selection.sync="selectedCar2" selectionMode="single" dataKey="vin"
|
||||||
stateStorage="local" stateKey="dt-state-demo-local">
|
stateStorage="local" stateKey="dt-state-demo-local">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
|
@ -211,6 +215,8 @@ export default {
|
||||||
{name: 'Orange', value: 'Orange'},
|
{name: 'Orange', value: 'Orange'},
|
||||||
{name: 'Blue', value: 'Blue'}
|
{name: 'Blue', value: 'Blue'}
|
||||||
],
|
],
|
||||||
|
selectedCar1: null,
|
||||||
|
selectedCar2: null,
|
||||||
cars: null
|
cars: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue