Haulmont / jmix-frontend

Monorepo for Jmix Frontend Tools and Libraries
https://www.jmix.io
Apache License 2.0
17 stars 10 forks source link

Validation error notification isn't displayed for composition 1-to-M field #508

Closed owlet1997 closed 3 years ago

owlet1997 commented 3 years ago

Enviroment: Jmix version: 1.0.999-SNAPSHOT Jmix Studio plugin version: 1.1.SNAPSHOT3273-211 IntelliJ version: IntelliJ IDEA 2021.1.3 (Ultimate Edition)

TC:

  1. Open attached project -> Run Jmix app -> Run React app
  2. Open react app in a browser -> Login -> Open Customers List
  3. Create new Customer -> click add entities near Partcomp
  4. Create new Part entity -> set age value > 10 -> set name value with length < 5 -> Ok
  5. Return to Customer editor -> Open dev tools, network tab -> click Submit button

AR: GraphQL errors are displayed in responce preview, validation error notification isn't displayed for Partcomp field: image

ER: Validation error is displayed like this: image

Frontend

Before example-react-app update the environment:

The error in composition one to many doesn't have array nesting. unnesting error.png

Validation works, but it's the wrong field error path. It has to be compositionO2Mattr[0].quantity validation works

After example-react-app update the environment:

The error doesn't have information about the error. empty error data.png

vadimbasko commented 3 years ago

scr-jmix project updated, now this issue could be reproduced on query


mutation {
  upsert_scr_CompositionO2MTestEntity(compositionO2MTestEntity: {
    deeplyNestedO2Mattr: [
      {name: "123456"}
    ]
  }) {
    _instanceName
  }
}
vadimbasko commented 3 years ago

Frontend part of the issue could be implemented using 1.0.0 jmix version. Backend works incorrect on 1.0.999-SNAPSHOT issue created https://github.com/Haulmont/jmix-graphql/issues/180