Skip to content
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

Feat react ref #1463

Merged
merged 15 commits into from May 16, 2024
Merged

Feat react ref #1463

merged 15 commits into from May 16, 2024

Conversation

CommanderXL
Copy link
Member

No description provided.

})
},
__getRefVal (key) {
if (!this.__refs.current[key]) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

为啥需要这个_refs


const getDataset = (props) => {
return wrapFn((resolve) => {
props = props.current
Copy link
Collaborator

Choose a reason for hiding this comment

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

为啥props得用ref包裹?

@@ -120,12 +120,16 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) {
rawOptions = mergeOptions(rawOptions, type, false)
const components = currentInject.getComponents() || {}
const validProps = Object.assign({}, rawOptions.props, rawOptions.properties)
return memo((props, ref) => {
return memo(forwardRef((props, ref) => {
const refs = useRef({})
Copy link
Collaborator

Choose a reason for hiding this comment

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

这好像没有必要吧

@hiyuki hiyuki merged commit c3bba5a into didi:feat-react May 16, 2024
2 checks passed
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.

None yet

2 participants