Skip to content

Commit

Permalink
fix(picker): picker prompt also need the value prop (#1172)
Browse files Browse the repository at this point in the history
  • Loading branch information
aiyogg authored Aug 19, 2024
1 parent 2f43570 commit 6194d09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/zarm/src/picker/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ ReactDOM.render(<Demo />, mountNode);
Picker 支持指令式调用,提供了 `prompt` 方法

```tsx
prompt: (props: Omit<PickerProps, 'visible' | 'visible' | 'children'>) =>
prompt: (props: Omit<PickerProps, 'visible' | 'children'>) =>
Promise<PickerValue[] | null>;
```

Expand Down
2 changes: 1 addition & 1 deletion packages/zarm/src/picker/prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface PickerPromptValue {
items: PickerColumnItem[];
}

export const prompt = (props: Omit<PickerProps, 'value' | 'visible' | 'children'>) => {
export const prompt = (props: Omit<PickerProps, 'visible' | 'children'>) => {
return new Promise<PickerPromptValue>((resolve) => {
const { close } = renderImperatively(
<Picker
Expand Down

0 comments on commit 6194d09

Please sign in to comment.