Skip to content

Commit

Permalink
feat(checkbox): the initial value of prefix (#1142)
Browse files Browse the repository at this point in the history
  • Loading branch information
zonemeen committed Jul 19, 2022
1 parent 945e20a commit 783ce82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/checkbox/src/index.ts
Expand Up @@ -3,6 +3,7 @@ import {
useState,
useRef,
useKeypress,
usePrefix,
isUpKey,
isDownKey,
isSpaceKey,
Expand Down Expand Up @@ -30,7 +31,7 @@ type State<Value> = {

export default createPrompt(
<Value>(state: State<Value>, done: (value: Array<Value>) => void): string => {
const { prefix, pageSize = 7, instructions } = state;
const { prefix = usePrefix(), pageSize = 7, instructions } = state;
const paginator = useRef(new Paginator()).current;

const [status, setStatus] = useState('pending');
Expand Down

0 comments on commit 783ce82

Please sign in to comment.