eui
eui copied to clipboard
[EuiSuperDatePicker] Support `onFocus`
EuiSuperDatePicker should support onFocus. Given that there are multiple focusbale elements, the provided callback should likely only be called once on the initial element focus and not for each subcomponent focus event.
Hi, i would like to give this issue a shot
@ConaGo Go for it!
Hey, i implemented the change also added a test. Unfortunately this test will make another, seemingly unrelated test fail
`
$ cross-env NODE_ENV=test jest --config ./scripts/jest/config.json
FAIL src/components/date_picker/super_date_picker/date_modes.test.ts (11.944s)
● dateMode › toRelativeString
expect(received).toBe(expected) // Object.is equality
Expected: "now"
Received: "now-1s"
55 |
56 | test('toRelativeString', () => {
> 57 | expect(toRelativeString('2019-03-19T00:00:00.000Z')).toBe('now');
| ^
58 | expect(toRelativeString('2020-03-19T00:00:00.000Z')).toBe('now+1y'); 59 | expect(toRelativeString('2019-03-12T00:00:00.000Z')).toBe('now-1w'); 60 | expect(toRelativeString('2019-03-17T00:00:00.000Z')).toBe('now-2d');
at Object.<anonymous> (src/components/date_picker/super_date_picker/date_modes.test.ts:57:58)
` I made a pull request and hope we can resolve this issue together
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.