Comments (7)
@ewhanson This should resolve the workaround you are having in OrcidForm.vue. What you think?
ui-library: pkp/ui-library#357
from pkp-lib.
Hey @jardakotesovec, thanks for this! I think this gets most of the way to solving my issues. It is possible to save a form with conditionally hidden required elements blank, but if there are previous errors, they are not dismissed when the fields are hidden (see video).
orcid_settings.mp4
from pkp-lib.
@ewhanson Ok.. additionally added removing error on field unmount, which can be think about as clean up for field which is not relevant anymore.
At this point I think this should work well.. can't think of where it could cause problems at this point.. but if you can think of something please let me know!
from pkp-lib.
Thanks @jardakotesovec! This is most of the way there now, but I'm still running into an error. It seems that only one error is removed at a time when the components are unmounted. I have an example where there are 3 "required fields not completed" errors. And each time I hide/unmount the components, another one of the errors is removed.
orcid.mp4
from pkp-lib.
@ewhanson Great catch, thanks! I did not test it with more than one field, so I did not notice it.
It went wrong, because how the state management is structured currently there. So every removing error created new errors object with that one error removed. But the errors object prop don't get propagated between these calls.. so all of them were modifying the original object and basically last change win.
Not fan of the solution I end up with.. hence the long comment in the code.. but it does work and I still think that this is how it should behave and it should remove the errors if the field gets removed.
from pkp-lib.
Hey @jardakotesovec, that makes sense. I've done some testing with the latest changes and it's working as expected now. 👍
from pkp-lib.
@ewhanson Thank you, merged.
from pkp-lib.
Related Issues (20)
- Filter user group IDs for current context in user forms
- Limit "permission level" when creating a new role as a Journal Manager HOT 1
- Including tasks in the submission workflow
- Port tool to move locale keys to 3.3 branch HOT 2
- Convert Notes to an Eloquent model
- Convert Queries to an Eloquent model
- RemoveUnvalidatedExpiredUsers never selects any users HOT 1
- Dates Not Displayed in "Invitation To Review" Submission Emails
- OMP does not allow submissions if a press has no active series HOT 5
- Editorial Activity Documentation Bug
- Remove editorialTeam.tpl from theme plugins
- Consider new ORCID implementation in Editorial Masthead and Editorial History page
- Ampersand on publication title breaks the Crossref XML export HOT 1
- [ojs-3.4.0-5, php 8.3.8.r2] Fatal ERROR 500, blank page on article page preview as well as published pages HOT 2
- Article PDF viewer does not use rich-formatted titles
- Locale with variants prevent submission wizard to load HOT 3
- Hide or remove provider's secrets in the administration "system info" page HOT 8
- Outstanding editorial task automatic email content going wrong HOT 5
- Button Orders in OJS
- Side Modal / Pop-up Closing behaviour
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pkp-lib.