eui icon indicating copy to clipboard operation
eui copied to clipboard

[EuiSuperDatePicker] Support `onFocus`

Open thompsongl opened this issue 4 years ago • 5 comments
trafficstars

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.

thompsongl avatar Jun 28 '21 14:06 thompsongl

Hi, i would like to give this issue a shot

ConaGo avatar Jul 02 '21 00:07 ConaGo

@ConaGo Go for it!

thompsongl avatar Jul 06 '21 14:07 thompsongl

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

ConaGo avatar Jul 08 '21 15:07 ConaGo

👋 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.

github-actions[bot] avatar Jan 04 '22 16:01 github-actions[bot]

👋 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.

github-actions[bot] avatar Jul 04 '22 00:07 github-actions[bot]

👋 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.

github-actions[bot] avatar Jan 01 '23 16:01 github-actions[bot]

❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

github-actions[bot] avatar Jan 09 '23 00:01 github-actions[bot]