million
million copied to clipboard
[$50] modified state value is not reflected into the input field.
What version of million
are you using?
2.6.4
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
yarn
What operating system are you using?
Windows
What browser are you using?
Chrome
Describe the Bug
The variable's state get reset when passing empty string but the input field doesn't get emptied. Problem is demonstrated more clearly through a video
https://github.com/aidenybai/million/assets/12785891/abd5b0cc-39e6-4271-bb73-d09643629e80
What's the expected result?
When resetting the status to empty value, then input field should be reset as well.
Link to Minimal Reproducible Example
Check the video (easy to reproduce)
Participation
- [ ] I am willing to submit a pull request for this issue.
I'll come back to this issue when I have a better network connectivity
I had the same issue, I switched to making my input form an uncontrolled component in #655
I wasn't sure if its my implementation problem or the way million decides when to pass updated props to the child component.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.
I notified core team about this @UzairNoman, @vimode. Thank you both for this. We'll be looking into it.
This issue seems to be related to #797.
/bounty $50
💎 $50 bounty created by aidenybai
🙋 If you start working on this, comment /attempt #680
along with your implementation plan
👉 To claim this bounty, submit a pull request that includes the text /claim #680
somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to aidenybai/million!
👉 Add a bounty • Share on socials
Attempt | Started (GMT+0) | Solution |
---|---|---|
🔴 @Divy0007 | Nov 15, 2023, 7:55:34 PM | WIP |
🟢 @Krishnakalani111 | Dec 6, 2023, 7:41:00 AM | WIP |
🟢 @ologbonowiwi | #833 |
💡 @ologbonowiwi submitted a pull request that claims the bounty. You can visit your bounty board to reward.
Hey folks, as mentioned on MDN's setAttribute documentation
Using setAttribute() to modify certain attributes, most notably value in XUL, works inconsistently, as the attribute specifies the default value. To access or modify the current values, you should use the properties. For example, use Element.value instead of Element.setAttribute().
I've fixed it, opened a PR, and used el.value = value
for such cases. It worked successfully here (I tested it against the github-user-search
example). Let me know if there are any tweaks required for #833 :smile:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.
@ologbonowiwi: Your claim has been rewarded! We'll notify you once it is processed.
🎉🎈 @ologbonowiwi has been awarded $50! 🎈🎊
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.
Hey, @tobySolutions , can I work on this issue
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.