Skip to content

fix: auto focus #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2020
Merged

fix: auto focus #48

merged 1 commit into from
May 18, 2020

Conversation

hengkx
Copy link
Member

@hengkx hengkx commented May 18, 2020

fix #47

@codecov
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #48 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #48   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           43        43           
  Branches        12        12           
=========================================
  Hits            43        43           
Impacted Files Coverage Δ
src/index.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf142cc...b4841ba. Read the comment docs.

@afc163
Copy link
Member

afc163 commented May 18, 2020

检查一下之前用例为啥不会报错?

@hengkx
Copy link
Member Author

hengkx commented May 18, 2020

检查一下之前用例为啥不会报错?

组件自己带有focus方法
image

@hengkx
Copy link
Member Author

hengkx commented May 18, 2020

改为focus1单侧就过不去了

}
}, [props.autoFocus, props.disabled]);
}, [props.autoFocus]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

自动获取焦点 需要根据属性改变做出响应吗?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@zombieJ zombieJ May 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hengkx 这个你先不用动了,我这边有一部分其他重构。会一起弄掉哈。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@afc163
Copy link
Member

afc163 commented May 18, 2020

知道了, window.focus

@afc163 afc163 merged commit 5e70f0b into react-component:master May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants