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, type: String,
default: undefined default: undefined
}, },
stripedRows: {
type: Boolean,
default: false
},
tabindex: { tabindex: {
type: Number, type: Number,
default: 0 default: 0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@
* @module picklist * @module picklist
* *
*/ */
import { ButtonHTMLAttributes, HTMLAttributes, TransitionProps, VNode } from 'vue'; import { TransitionProps, VNode } from 'vue';
import { ComponentHooks } from '../basecomponent'; import { ComponentHooks } from '../basecomponent';
import { ButtonPassThroughOptions } from '../button'; import { ButtonPassThroughOptions } from '../button';
import { PassThroughOptions } from '../passthrough'; import { PassThroughOptions } from '../passthrough';
@ -279,16 +279,6 @@ export interface PickListState {
* Current id state as a string. * Current id state as a string.
*/ */
d_selection: any[]; 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. * Current view change state as a boolean.
* @defaultValue false * @defaultValue false
@ -378,46 +368,6 @@ export interface PickListProps {
* Index of the list element in tabbing order. * Index of the list element in tabbing order.
*/ */
tabindex?: number | string | undefined; 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. * Used to pass attributes to DOM elements inside the component.
* @type {PickListPassThroughOptions} * @type {PickListPassThroughOptions}

View File

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