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

Add more/ Remove button #3

Merged
merged 3 commits into from
Oct 6, 2021
Merged

Add more/ Remove button #3

merged 3 commits into from
Oct 6, 2021

Conversation

amitaibu
Copy link
Owner

@amitaibu amitaibu commented Oct 6, 2021

Peek.2021-10-06.13-11.mp4

One thing I've noticed is that on console.log we get those warnings:

image

I suspect it's related to digitallyinduced/ihp#1099

@amitaibu amitaibu merged commit eab50cd into main Oct 6, 2021
@amitaibu amitaibu deleted the add-more-button branch October 6, 2021 10:14
<label>
Max
</label>
<input type="number" name="max" value="{get #max bidStep}" class={classes ["form-control", ("is-invalid", isInvalidMax)]}/>

Choose a reason for hiding this comment

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

To fix the console warnings try this:

-value="{get #max bidStep}"
+value={inputValue (get #max bidStep)}

Copy link
Owner Author

Choose a reason for hiding this comment

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

@mpscholten 👋

If I change to value="... I get

The specified value "{inputValue (get #min bidStep)}" cannot be parsed, or is out of range.

Removing the quotes (") results with no errors, however the default value is now set to 0 (instead of remaining blank).

Selection_999(283)

btw, if I manually remove the 0, and try to submit, I'd still get an error:

Selection_999(284)

Selection_999(285)

Choose a reason for hiding this comment

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

Yes the quotes need to be removed :)

Try this:

value={if didChange #max bidStep
    then inputValue (get #max bidStep)
    else ""
}

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah, the if didChange did the trick.

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.

2 participants