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