From 6194d0926c0721f1ae450327833f9be77b8e4c7e Mon Sep 17 00:00:00 2001 From: Chuck <403chuck@gmail.com> Date: Mon, 19 Aug 2024 16:29:47 +0800 Subject: [PATCH] fix(picker): picker prompt also need the `value` prop (#1172) --- packages/zarm/src/picker/demo.md | 2 +- packages/zarm/src/picker/prompt.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/zarm/src/picker/demo.md b/packages/zarm/src/picker/demo.md index f7a2840e2..b552b349b 100644 --- a/packages/zarm/src/picker/demo.md +++ b/packages/zarm/src/picker/demo.md @@ -494,7 +494,7 @@ ReactDOM.render(, mountNode); Picker 支持指令式调用,提供了 `prompt` 方法 ```tsx -prompt: (props: Omit) => +prompt: (props: Omit) => Promise; ``` diff --git a/packages/zarm/src/picker/prompt.tsx b/packages/zarm/src/picker/prompt.tsx index b27c875a6..f4f80e68d 100644 --- a/packages/zarm/src/picker/prompt.tsx +++ b/packages/zarm/src/picker/prompt.tsx @@ -9,7 +9,7 @@ export interface PickerPromptValue { items: PickerColumnItem[]; } -export const prompt = (props: Omit) => { +export const prompt = (props: Omit) => { return new Promise((resolve) => { const { close } = renderImperatively(