* Handles the 'keydown' event.
*/
private keydown(event: KeyboardEvent): void {
- if ((this.activeItem !== null && UiDropdownSimple.isOpen(this.dropdownContainerId)) || this.preventSubmit) {
+ if ((this.activeItem && UiDropdownSimple.isOpen(this.dropdownContainerId)) || this.preventSubmit) {
if (event.key === "Enter") {
event.preventDefault();
}
*/
private keyup(event: KeyboardEvent): void {
// handle dropdown keyboard navigation
- if (this.activeItem !== null || !this.autoFocus) {
+ if (this.activeItem || !this.autoFocus) {
if (UiDropdownSimple.isOpen(this.dropdownContainerId)) {
if (event.key === "ArrowUp") {
event.preventDefault();
* Handles the 'keydown' event.
*/
keydown(event) {
- if ((this.activeItem !== null && Simple_1.default.isOpen(this.dropdownContainerId)) || this.preventSubmit) {
+ if ((this.activeItem && Simple_1.default.isOpen(this.dropdownContainerId)) || this.preventSubmit) {
if (event.key === "Enter") {
event.preventDefault();
}
*/
keyup(event) {
// handle dropdown keyboard navigation
- if (this.activeItem !== null || !this.autoFocus) {
+ if (this.activeItem || !this.autoFocus) {
if (Simple_1.default.isOpen(this.dropdownContainerId)) {
if (event.key === "ArrowUp") {
event.preventDefault();