How to use the @ui5/webcomponents-base/dist/events/PseudoEvents.js.isSpace 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 / Switch.js View on Github external
_onkeyup(event) {
		if (isSpace(event)) {
			this.toggle();
		}
	}
github SAP / ui5-webcomponents / packages / main / src / CheckBox.js View on Github external
_onkeydown(event) {
		if (isSpace(event)) {
			event.preventDefault();
		}

		if (isEnter(event)) {
			this.toggle();
		}
	}
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 / RadioButton.js View on Github external
_onkeyup(event) {
		if (isSpace(event)) {
			this.toggle();
		}
	}
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 / fiori / src / ProductSwitchItem.js View on Github external
_onkeyup(event) {
		if (isSpace(event) || isEnter(event)) {
			this.active = false;
		}

		if (isSpace(event)) {
			this._fireItemClick();
		}
	}
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 / Switch.js View on Github external
_onkeydown(event) {
		if (isSpace(event)) {
			event.preventDefault();
		}

		if (isEnter(event)) {
			this.toggle();
		}
	}
github SAP / ui5-webcomponents / packages / main / src / CheckBox.js View on Github external
_onkeyup(event) {
		if (isSpace(event)) {
			this.toggle();
		}
	}

@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