Skip to content

Add form alerts and add implementation for PF4 - #1059

Merged
rvsia merged 5 commits into
data-driven-forms:masterfrom
rvsia:addFormAlerts
May 31, 2021
Merged

rvsia merged 5 commits into
data-driven-forms:masterfrom
rvsia:addFormAlerts

Conversation

@rvsia

@rvsia rvsia commented May 31, 2021

Copy link
Copy Markdown
Contributor

Part of #923

Description

Adds BeforeError component to common FormTemplate.

Adds alertProps to common FormTemplate.

Adds implementation of the Alert for PF4 mapper (based on guidelines)

Reexports FORM_ERROR as FormError in the renderer package.

Schema (if applicable)

    validate={({something}) => {
        if(something?.length > 3) {
            return {[FormError]: 'too long'}
        }

        if(something) {
            return {[FormError]: 'too short'}
        }

        return {}
    }}

Kapture 2021-05-31 at 14 41 34

@rvsia rvsia added enhancement New feature or request PF4 PF4 pull request renderer React form renderer PR common labels May 31, 2021
@rvsia
rvsia requested a review from Hyperkid123 May 31, 2021 12:52
@codecov

codecov Bot commented May 31, 2021

Copy link
Copy Markdown

Codecov Report

Merging #1059 (6567210) into master (a7f73ec) will decrease coverage by 0.09%.
The diff coverage is 64.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1059      +/-   ##
==========================================
- Coverage   85.31%   85.22%   -0.10%     
==========================================
  Files         202      202              
  Lines        3391     3404      +13     
  Branches     1168     1173       +5     
==========================================
+ Hits         2893     2901       +8     
- Misses        498      503       +5     
Impacted Files Coverage Δ
packages/common/src/form-template/form-template.js 0.00% <0.00%> (ø)
...omponent-mapper/src/form-template/form-template.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b9c524...6567210. Read the comment docs.

@rvsia
rvsia merged commit b8cc9da into data-driven-forms:master May 31, 2021
@Hyperkid123

Copy link
Copy Markdown
Member

🎉 This PR is included in version 3.7.0 🎉

The release is available on

Demo can be found here!

@rvsia
rvsia deleted the addFormAlerts branch June 14, 2021 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common enhancement New feature or request PF4 PF4 pull request released renderer React form renderer PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants