New stripedRows for Orderlist
parent
cc53fefbc9
commit
838be3bb87
|
@ -61,6 +61,10 @@ export interface OrderListProps {
|
||||||
* Default value is '960px'.
|
* Default value is '960px'.
|
||||||
*/
|
*/
|
||||||
breakpoint?: string | undefined;
|
breakpoint?: string | undefined;
|
||||||
|
/**
|
||||||
|
* Whether to displays rows with alternating colors.
|
||||||
|
*/
|
||||||
|
stripedRows?: boolean | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OrderListSlots {
|
export interface OrderListSlots {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="p-orderlist p-component">
|
<div :class="containerClass">
|
||||||
<div class="p-orderlist-controls">
|
<div class="p-orderlist-controls">
|
||||||
<slot name="controlsstart"></slot>
|
<slot name="controlsstart"></slot>
|
||||||
<OLButton type="button" icon="pi pi-angle-up" @click="moveUp"></OLButton>
|
<OLButton type="button" icon="pi pi-angle-up" @click="moveUp"></OLButton>
|
||||||
|
@ -61,6 +61,10 @@ export default {
|
||||||
breakpoint: {
|
breakpoint: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '960px'
|
default: '960px'
|
||||||
|
},
|
||||||
|
stripedRows: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemTouched: false,
|
itemTouched: false,
|
||||||
|
@ -352,6 +356,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
containerClass() {
|
||||||
|
return ['p-orderlist p-component', {
|
||||||
|
'p-orderlist-striped': this.stripedRows
|
||||||
|
}];
|
||||||
|
},
|
||||||
attributeSelector() {
|
attributeSelector() {
|
||||||
return UniqueComponentId();
|
return UniqueComponentId();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<div class="content-section implementation">
|
<div class="content-section implementation">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<OrderList v-model="products" listStyle="height:auto" dataKey="id">
|
<OrderList v-model="products" listStyle="height:auto" dataKey="id" stripedRows>
|
||||||
<template #header>
|
<template #header>
|
||||||
List of Products
|
List of Products
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -125,6 +125,12 @@ import OrderList from 'primevue/orderlist';
|
||||||
<td>string</td>
|
<td>string</td>
|
||||||
<td>960px</td>
|
<td>960px</td>
|
||||||
<td>The breakpoint to define the maximum width boundary when responsiveness is enabled.</td>
|
<td>The breakpoint to define the maximum width boundary when responsiveness is enabled.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>stripedRows</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>false</td>
|
||||||
|
<td>Whether to displays rows with alternating colors.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue