react-component / react-component/picker
rangepicker不支持受控
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 304
- Forks
- 345
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 7
Description
rangepicker我想使用受控模式,发现选择完后,下拉框不能自动收起
export default () => {
const [open, setOpen] = useState(false);
return (
<div>
<RangePicker<Moment>
generateConfig={momentGenerateConfig}
locale={zhCN}
picker="week"
allowClear
open={open}
onOpenChange={(open) => {
console.log("onOpenChange =>", open);
setOpen(open);
}}
/>
<button type="button">233</button>
</div>
);
};
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the linked CodeSandbox and reproduce the controlled RangePicker case using open and onOpenChange with the week picker. Trace the RangePicker behavior for controlled visibility, then verify that selecting a range closes the dropdown while the controlled state remains synchronized.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100