Repository navigation
pfModalOverlay: allow async validations while keeping modal open, demo maxlength validation - #756
Conversation
d06e923 to
27cf462
Compare
beanh66
left a comment
There was a problem hiding this comment.
@dtaylor113 This is working great! Wondering if we can adjust the visuals to match the PF "Errors and Validation" pattern.
|
Following the Errors and Validation pattern would include an inline notification at the top with the specific field-level errors listed out by each field. Below is an example of what I mean: |
|
Hi @beanh66, ok, sounds good. The example here actually can have several error messages, how would that be displayed in the modal? |
|
@beanh66, ok, thanks, that makes sense. I'll work on it some more. I may create another Issue/PR for this additional work because it's not what this PR was directly addressing. -thanks |
...for the inline notification at the top that is, the field level help shouldn't be an issue for this PR. I need to figure out if the inline notification at the top should be baked into the component, or done via the app dev's supplied form. |
27cf462 to
8a26ac1
Compare
|
Hi @beanh66, updated the screenshot/video in this PR's description. PTAL -thanks! |
3dde992 to
1ddd033
Compare
|
@jeff-phillips-18, hoping you could take a look -thanks |
| ctrl.ok = function (label, actionFn) { | ||
| if (typeof actionFn === "function") { | ||
| actionFn(); | ||
| if (actionFn() !== false) { |
There was a problem hiding this comment.
Only concern would be an existing application returning false but not expecting the modal to remain open. Unlikely unless it is just happenstance. I think it's OK to assume that unlikelyhood is great enough to proceed.
There was a problem hiding this comment.
Yeah, I tend to agree that scenario is unlikely. If an app was returning false, I'm not sure why or what controller would be processing a true or false? The component executes the button actionFns and it wasn't expecting any return values.
1ddd033 to
0bfb005
Compare
5cf8851 to
4cf62e6
Compare
4cf62e6 to
80c72b9
Compare


Description
Fixes #755
Added the ability to return

falsefor actionBtn function(s) to keep modal open. Allows app dev to click 'Save', show spinner & perform async validation, and if invalid display error msg, or if valid, programmatically close the modal:Also demonstrated how to perform
ng-maxlengthvalidations.Also fixes #757 (Broken Semantic Release)
PR Checklist