Skip to content

Commit

Permalink
focus event fix
Browse files Browse the repository at this point in the history
Switched focus and blur out for focusin and focusout due to unintended side effect. React appears to have switch to using it even though it fires a warning. facebook/react#19186
  • Loading branch information
thang2162 committed May 24, 2023
1 parent 2a2696a commit d7f7cab
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
window['DOCS_OPTIONS'] = {"defaultName":"Docs","autodocs":"tag"};</script><script type="module">import './sb-preview/runtime.js';


import './runtime~main.df457fb3.iframe.bundle.js';
import './runtime~main.55532680.iframe.bundle.js';

import './476.1675bf9f.iframe.bundle.js';

Expand Down
2 changes: 1 addition & 1 deletion docs/project.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"generatedAt":1684968700113,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"npm","version":"9.6.6"},"framework":{"name":"@storybook/react-webpack5","options":{}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/react","storybookVersion":"7.0.15","storybookVersionSpecifier":"^7.0.15","language":"javascript","storybookPackages":{"@storybook/blocks":{"version":"7.0.15"},"@storybook/react":{"version":"7.0.15"},"@storybook/react-webpack5":{"version":"7.0.15"},"@storybook/testing-library":{"version":"0.1.0"},"storybook":{"version":"7.0.15"}},"addons":{"@storybook/addon-links":{"version":"7.0.15"},"@storybook/addon-essentials":{"version":"7.0.15"},"@storybook/addon-interactions":{"version":"7.0.15"},"@storybook/addon-mdx-gfm":{"version":"7.0.15"}}}
{"generatedAt":1684969061125,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"npm","version":"9.6.6"},"framework":{"name":"@storybook/react-webpack5","options":{}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/react","storybookVersion":"7.0.15","storybookVersionSpecifier":"^7.0.15","language":"javascript","storybookPackages":{"@storybook/blocks":{"version":"7.0.15"},"@storybook/react":{"version":"7.0.15"},"@storybook/react-webpack5":{"version":"7.0.15"},"@storybook/testing-library":{"version":"0.1.0"},"storybook":{"version":"7.0.15"}},"addons":{"@storybook/addon-links":{"version":"7.0.15"},"@storybook/addon-essentials":{"version":"7.0.15"},"@storybook/addon-interactions":{"version":"7.0.15"},"@storybook/addon-mdx-gfm":{"version":"7.0.15"}}}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/components/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ const DatePicker = (props) => {
style={mergedStyle.input}
value={selectedDate}
onChange={handleDateChange}
onFocus={(e) =>
onFocusIn={(e) =>
(e.target.style = {
...mergedStyle.input,
...mergedStyle.input_focused,
})
}
onBlur={(e) => (e.target.style = mergedStyle.input)}
onFocusOut={(e) => (e.target.style = mergedStyle.input)}
{...ariaProps}
/>
</div>
Expand Down

0 comments on commit d7f7cab

Please sign in to comment.