add spinbutton poc

This commit is contained in:
Liam DeBeasi
2023-10-10 16:22:34 -04:00
parent eee2115fd2
commit 726e4aeae7

View File

@@ -414,9 +414,11 @@ export class PickerColumnInternal implements ComponentInterface {
}
render() {
const { items, color, isActive, numericInput } = this;
const { items, color, isActive, numericInput, value } = this;
const mode = getIonMode(this);
const activeItem = items.find(item => item.value === value);
/**
* exportparts is needed so ion-datetime can expose the parts
* from two layers of shadow nesting. If this causes problems,
@@ -425,6 +427,11 @@ export class PickerColumnInternal implements ComponentInterface {
*/
return (
<Host
role="spinbutton"
aria-valuemin="0"
aria-valuemax="0"
aria-valuenow={activeItem ? activeItem.value : null}
aria-valuetext={activeItem ? activeItem.text : null}
exportparts={`${PICKER_ITEM_PART}, ${PICKER_ITEM_ACTIVE_PART}`}
tabindex={0}
class={createColorClasses(color, {