You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, isPending is initialized as true when promise is initialized as null. This is frustrating as it makes the form being rendered as in a loading state (at first I was confused as it is not what I expected, and could not find the problem).
This is intentional so the promise is on a pending state until there is something to wait for. Using a resolved promise to make the state automatically go into resolved is the way to go. It clearly expresses that we start as resolved
Promised is meant to reflect the 3 states of a promise, introducing new ones only complexifies the api and detach it more from the js promises
Hey,
I started to use the
combined
slot as I find it more flexible for forms disabled states.For example:
By default,
isPending
is initialized astrue
when promise is initialized asnull
. This is frustrating as it makes the form being rendered as in a loading state (at first I was confused as it is not what I expected, and could not find the problem).vue-promised/src/index.js
Lines 20 to 26 in fe001cf
vue-promised/src/index.js
Lines 29 to 35 in fe001cf
The workAround I use is to set a resolved Promise as initialization, but I don't think that is very beautiful 👀
Maybe a prop could be added to init as
false
instead oftrue
.That's not a huge deal though.
Have a nice day!
The text was updated successfully, but these errors were encountered: