Open arikfr opened 5 years ago
Looks like the calendar hijacks the keyboard, so ctrl+ent closes it then another applies. I'll look into it.
Oh I think it's just a matter of disabling the need for "ok" click as now it's not needed.
The behavior seems a bit different with me, am I missing something?
(Ctrl+enter applies the value and opens the calendar again as enter
key press event is passed to Antd DatePicker)
@ranbena for the React version it's basically the same, with the difference that e.preventDefault()
doesn't allow it to trigger the calendar opening.
I tested when the Calendar was closed, when it's open "the calendar hijacks the keyboard" seems to happen. The same doesn't happen in #4006.
It is indeed not working when you select a Dynamic value to it, but in this case seems to be a matter of giving focus to the parameter after the selection.
It is indeed not working when you select a Dynamic value to it, but in this case seems to be a matter of giving focus to the parameter after the selection.
That's right.
I tested when the Calendar was closed, when it's open "the calendar hijacks the keyboard" seems to happen. The same doesn't happen in #4006.
Also right. Still, the calendar opens up on apply with ctrl+enter. I struggled with it a bit but didn't get anywhere.
Still, the calendar opens up on apply with ctrl+enter.
It doesn't on the React version :stuck_out_tongue_closed_eyes:.
I'll start by working on the focus on the Date Picker and then we see where we can get :)
Still, the calendar opens up on apply with ctrl+enter.
It doesn't on the React version 😝.
I meant this: "(Ctrl+enter applies the value and opens the calendar again as enter key press event is passed to Antd DatePicker)"
I meant this: "(Ctrl+enter applies the value and opens the calendar again as enter key press event is passed to Antd DatePicker)"
Me too, ~the preventDefault worked to me~ it actually did not :sweat_smile:.
Not so related to the issue, #4033 will improve a little bit the behavior when you select dynamic values. Despite that, as I mentioned in the PR, Antd doesn't support key events in DatePicker
api for now. Seems to be in their plans to extend it, but no idea on when (ref).
I believe it's possible to workaround that by forcing the focus to be somewhere else when the Calendar is closed, but I don't think it's worth it.
Steps to Reproduce
Expected: it would apply changes. Actual: nothing happens. :cry:
Technical details: