DiscipleTools / disciple-tools-web-components

https://jade-chebakia-17493f.netlify.app/?path=/story/kitchen-sink--kitchen-sink
GNU General Public License v2.0
3 stars 8 forks source link

feature/real-time-input-update #97

Open Muniraj132 opened 1 week ago

Muniraj132 commented 1 week ago

@incraigulous, This PR improves the user experience in the DtText component by updating the input value in real-time. It replaces the 'change' event with the 'input' event to ensure that the value is reflected immediately as the user types.

Changes include:

netlify[bot] commented 1 week ago

Deploy request for jade-chebakia-17493f pending review.

Visit the deploys page to approve it

Name Link
Latest commit 3825e8639b222cf3257923bf77fc2ccdad3ad9b1
micahmills commented 1 week ago

Hey @Muniraj132 and @incraigulous. I can definitely see the use case for this real time update. As we are working to implement the components into the DT theme we are using the componentServices file to turn on auto saving. So the this._change function fires off a change event that we are listening for. If we change that to fire on input, it will hit the database every letter that is typed, and that probably isn't ideal.

I think we could create a separate input event that changes the value, and that might solve the problem you are having, but keep the change event the same.