@inquirer/select
Advanced tools
Comparing version 0.0.27-alpha.0 to 0.0.28-alpha.0
@@ -7,2 +7,3 @@ import { createPrompt, useState, useKeypress, useRef, usePrefix, isEnterKey, isUpKey, isDownKey, isNumberKey, Paginator, } from '@inquirer/core'; | ||
const { choices } = config; | ||
const startIndex = Math.max(choices.findIndex(({ disabled }) => !disabled), 0); | ||
const paginator = useRef(new Paginator()).current; | ||
@@ -12,3 +13,3 @@ const firstRender = useRef(true); | ||
const [status, setStatus] = useState('pending'); | ||
const [cursorPosition, setCursorPos] = useState(0); | ||
const [cursorPosition, setCursorPos] = useState(startIndex); | ||
useKeypress((key) => { | ||
@@ -15,0 +16,0 @@ if (isEnterKey(key)) { |
{ | ||
"name": "@inquirer/select", | ||
"type": "module", | ||
"version": "0.0.27-alpha.0", | ||
"version": "0.0.28-alpha.0", | ||
"description": "Inquirer select/list prompt", | ||
@@ -67,3 +67,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "0e3ef8e31fc34b5fa5308be95af77ba9f5ede8fa" | ||
"gitHead": "c3b92d07e2f5d72976cf233f6ab13f00be9b1785" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7105
76