million icon indicating copy to clipboard operation
million copied to clipboard

[$50] modified state value is not reflected into the input field.

Open UzairNoman opened this issue 1 year ago • 17 comments

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.

UzairNoman avatar Oct 05 '23 18:10 UzairNoman

I'll come back to this issue when I have a better network connectivity

tobySolutions avatar Oct 05 '23 21:10 tobySolutions

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.

vimode avatar Oct 06 '23 02:10 vimode

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.

github-actions[bot] avatar Nov 03 '23 00:11 github-actions[bot]

I notified core team about this @UzairNoman, @vimode. Thank you both for this. We'll be looking into it.

tobySolutions avatar Nov 10 '23 16:11 tobySolutions

This issue seems to be related to #797.

tobySolutions avatar Nov 10 '23 16:11 tobySolutions

/bounty $50

aidenybai avatar Nov 14 '23 23:11 aidenybai

💎 $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 bountyShare 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

algora-pbc[bot] avatar Nov 14 '23 23:11 algora-pbc[bot]

💡 @ologbonowiwi submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] avatar Nov 15 '23 03:11 algora-pbc[bot]

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:

ologbonowiwi avatar Nov 15 '23 03:11 ologbonowiwi

/attempt #680

Options

Divy0007 avatar Nov 15 '23 19:11 Divy0007

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.

github-actions[bot] avatar Dec 06 '23 00:12 github-actions[bot]

/attempt #680

Options

Krishnakalani111 avatar Dec 06 '23 07:12 Krishnakalani111

@ologbonowiwi: Your claim has been rewarded! We'll notify you once it is processed.

algora-pbc[bot] avatar Dec 07 '23 10:12 algora-pbc[bot]

🎉🎈 @ologbonowiwi has been awarded $50! 🎈🎊

algora-pbc[bot] avatar Dec 09 '23 00:12 algora-pbc[bot]

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.

github-actions[bot] avatar Dec 24 '23 00:12 github-actions[bot]

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.

github-actions[bot] avatar Jan 16 '24 00:01 github-actions[bot]

Hey, @tobySolutions , can I work on this issue

skushagra9 avatar Jan 17 '24 08:01 skushagra9

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.

github-actions[bot] avatar Feb 03 '24 00:02 github-actions[bot]