pull/5507/head
tugcekucukoglu 2024-03-21 16:52:26 +03:00
parent 88c8b8e5f8
commit 6e2280009f
8 changed files with 25 additions and 58 deletions

View File

@ -82,6 +82,10 @@ export default {
type: String,
default: undefined
},
stripedRows: {
type: Boolean,
default: false
},
tabindex: {
type: Number,
default: 0

View File

@ -363,6 +363,11 @@ export interface ListboxProps {
* @defaultValue No results found
*/
emptyMessage?: string | undefined;
/**
* Whether to displays rows with alternating colors.
* @defaultValue false
*/
stripedRows?: boolean | undefined;
/**
* Index of the element in tabbing order.
*/

View File

@ -54,6 +54,10 @@ export default {
type: Number,
default: 0
},
disabled: {
type: Boolean,
default: false
},
ariaLabelledby: {
type: String,
default: null

View File

@ -223,6 +223,7 @@ export interface OrderListProps {
breakpoint?: string | undefined;
/**
* Whether to displays rows with alternating colors.
* @defaultValue false
*/
stripedRows?: boolean | undefined;
/**

View File

@ -44,6 +44,7 @@
:dataKey="dataKey"
:autoOptionFocus="autoOptionFocus"
:focusOnHover="focusOnHover"
:disabled="disabled"
:ariaLabel="ariaLabel"
:ariaLabelledby="ariaLabelledby"
:pt="ptm('list')"
@ -293,9 +294,7 @@ export default {
}
},
moveDisabled() {
if (!this.d_selection || !this.d_selection.length) {
return true;
}
return this.disabled ? true : !this.d_selection || !this.d_selection.length ? true : false;
}
},
computed: {

View File

@ -61,6 +61,10 @@ export default {
tabindex: {
type: Number,
default: 0
},
disabled: {
type: Boolean,
default: false
}
},
style: PickListStyle,

View File

@ -7,7 +7,7 @@
* @module picklist
*
*/
import { ButtonHTMLAttributes, HTMLAttributes, TransitionProps, VNode } from 'vue';
import { TransitionProps, VNode } from 'vue';
import { ComponentHooks } from '../basecomponent';
import { ButtonPassThroughOptions } from '../button';
import { PassThroughOptions } from '../passthrough';
@ -279,16 +279,6 @@ export interface PickListState {
* Current id state as a string.
*/
d_selection: any[];
/**
* Current focused state as a boolean.
* @defaultValue [false, false]
*/
focused: boolean;
/**
* Current focused item index as a number.
* @defaultvalue -1
*/
focusedOptionIndex: number;
/**
* Current view change state as a boolean.
* @defaultValue false
@ -378,46 +368,6 @@ export interface PickListProps {
* Index of the list element in tabbing order.
*/
tabindex?: number | string | undefined;
/**
* Used to pass all properties of the HTMLAttributes to the target list element.
*/
targetListProps?: HTMLAttributes | undefined;
/**
* Used to pass all properties of the HTMLAttributes to the source list element.
*/
sourceListProps?: HTMLAttributes | undefined;
/**
* Used to pass all properties of the HTMLButtonElement to the move up button inside the component.
*/
moveUpButtonProps?: ButtonHTMLAttributes | undefined;
/**
* Used to pass all properties of the HTMLButtonElement to the move top button inside the component.
*/
moveTopButtonProps?: ButtonHTMLAttributes | undefined;
/**
* Used to pass all properties of the HTMLButtonElement to the move down button inside the component.
*/
moveDownButtonProps?: ButtonHTMLAttributes | undefined;
/**
* Used to pass all properties of the HTMLButtonElement to the move bottom button inside the component.
*/
moveBottomButtonProps?: ButtonHTMLAttributes | undefined;
/**
* Used to pass all properties of the HTMLButtonElement to the move to target button inside the component.
*/
moveToTargetProps?: ButtonHTMLAttributes | undefined;
/**
* Used to pass all properties of the HTMLButtonElement to the move all to target button inside the component.
*/
moveAllToTargetProps?: ButtonHTMLAttributes | undefined;
/**
* Used to pass all properties of the HTMLButtonElement to the move to source button inside the component.
*/
moveToSourceProps?: ButtonHTMLAttributes | undefined;
/**
* Used to pass all properties of the HTMLButtonElement to the move all to source button inside the component.
*/
moveAllToSourceProps?: ButtonHTMLAttributes | undefined;
/**
* Used to pass attributes to DOM elements inside the component.
* @type {PickListPassThroughOptions}

View File

@ -45,6 +45,7 @@
:dataKey="dataKey"
:autoOptionFocus="autoOptionFocus"
:focusOnHover="focusOnHover"
:disabled="disabled"
:pt="ptm('list')"
:unstyled="unstyled"
@focus="onListFocus($event, 'sourceList')"
@ -108,6 +109,7 @@
:dataKey="dataKey"
:autoOptionFocus="autoOptionFocus"
:focusOnHover="focusOnHover"
:disabled="disabled"
:pt="ptm('list')"
:unstyled="unstyled"
@focus="onListFocus($event, 'targetList')"
@ -594,12 +596,10 @@ export default {
}
},
moveDisabled(index) {
if (this.d_selection && (!this.d_selection[index] || !this.d_selection[index].length)) {
return true;
}
return this.disabled ? true : this.d_selection && (!this.d_selection[index] || !this.d_selection[index].length) ? true : false;
},
moveAllDisabled(list) {
return ObjectUtils.isEmpty(this[list]);
return this.disabled ? true : ObjectUtils.isEmpty(this[list]);
}
},
computed: {