How to use the @ui5/webcomponents-base/dist/events/PseudoEvents.js.isEnter function in @ui5/webcomponents-base

To help you get started, we’ve selected a few @ui5/webcomponents-base examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / ui5-webcomponents / packages / main / src / TabContainer.js View on Github external
_onHeaderItemKeyDown(event) {
		if (isEnter(event)) {
			this._onHeaderItemSelect(event);
		}

		// Prevent Scrolling
		if (isSpace(event)) {
			event.preventDefault();
		}
	}
github SAP / ui5-webcomponents / packages / main / src / Select.js View on Github external
}

			this.options[this._selectedIndex].selected = false;
			this.options[nextIndex].selected = true;
			this._selectedIndex = nextIndex === -1 ? this._selectedIndex : nextIndex;

			if (shouldFireEvent) {
				this.fireEvent("change", { selectedOption: this.options[nextIndex] });
			}
		}

		if (isEscape(event)) {
			this._escapePressed = true;
		}

		if (isEnter(event) || isSpace(event)) {
			this._shouldClosePopover = true;
		}
	}
github SAP / ui5-webcomponents / packages / main / src / ListItem.js View on Github external
this.deactivateByKey = event => {
			if (isEnter(event)) {
				this.deactivate();
			}
		};
github SAP / ui5-webcomponents / packages / main / src / CalendarHeader.js View on Github external
_onkeydown(event) {
		if (isSpace(event) || isEnter(event)) {
			const showPickerButton = event.target.getAttribute("data-sap-show-picker");

			if (showPickerButton) {
				this[`_show${showPickerButton}Picker`]();
			}
		}
	}
github SAP / ui5-webcomponents / packages / main / src / ListItem.js View on Github external
_onkeyup(event) {
		if (isSpace(event) || isEnter(event)) {
			this.deactivate();
		}

		if (isSpace(event)) {
			this.fireItemPress(event);
		}
	}
github SAP / ui5-webcomponents / packages / main / src / ListItem.js View on Github external
_onkeydown(event) {
		super._onkeydown(event);

		const itemActive = this.type === ListItemType.Active;

		if (isSpace(event)) {
			event.preventDefault();
		}

		if ((isSpace(event) || isEnter(event)) && itemActive) {
			this.activate();
		}

		if (isEnter(event)) {
			this.fireItemPress(event);
		}
	}
github SAP / ui5-webcomponents / packages / main / src / Input.js View on Github external
_onkeydown(event) {
		if (isUp(event)) {
			return this._handleUp(event);
		}

		if (isDown(event)) {
			return this._handleDown(event);
		}

		if (isSpace(event)) {
			return this._handleSpace(event);
		}

		if (isEnter(event)) {
			return this._handleEnter(event);
		}

		this._keyDown = true;
	}
github SAP / ui5-webcomponents / packages / main / src / ListItem.js View on Github external
_onkeydown(event) {
		super._onkeydown(event);

		const itemActive = this.type === ListItemType.Active;

		if (isSpace(event)) {
			event.preventDefault();
		}

		if ((isSpace(event) || isEnter(event)) && itemActive) {
			this.activate();
		}

		if (isEnter(event)) {
			this.fireItemPress(event);
		}
	}
github SAP / ui5-webcomponents / packages / main / src / Button.js View on Github external
_onkeyup(event) {
		if (isSpace(event) || isEnter(event)) {
			this.active = false;
		}
	}
github SAP / ui5-webcomponents / packages / main / src / YearPicker.js View on Github external
_onkeydown(event) {
		if (isEnter(event)) {
			return this._handleEnter(event);
		}

		if (isSpace(event)) {
			return this._handleSpace(event);
		}
	}

@ui5/webcomponents-base

UI5 Web Components: webcomponents.base

Apache-2.0
Latest version published 5 days ago

Package Health Score

90 / 100
Full package analysis