Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
215 views
in Technique[技术] by (71.8m points)

javascript - workings with forms in fabric/fluent ui issues with refs and events

I started working with fabric/fluent ui. Not sure anybody else has this problem or I am looking in the wrong places.

Normally you can do in a form a single input handler and put the prop name to the html control together with a ref you can track the current value of the form. Pretty straight forward and easy.

   export const handleInputChange = (input, e ) => {
  input.current = ( { ...input.current, [e.currentTarget.name]: e.currentTarget.value });
}

With fabric ui I was not able to capture the events for most controls neither set a name that I can grab to assign a value from it.

Not sure there is a easier way to gather the data into a single object with such a simple function as below.

But you guys might know something similar or that I am not aware?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...