ix icon indicating copy to clipboard operation
ix copied to clipboard

IX Select error states dont work. The documentation is broke too

Open tobiask84 opened this issue 1 year ago • 5 comments

Prerequisites

  • [X] I have read the Contributing Guidelines.
  • [X] I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.

What happened?

Select error states do not work as the documentation describes it.

image

https://stackblitz.com/edit/tszcxf?file=src%2Fvalidation.tsx

above is the link for the documentation of the validation. it fails with:

Cannot find module 'ajv/dist/compile/codegen' Require stack:

  • /home/projects/tszcxf/node_modules/ajv-keywords/dist/definitions/typeof.js
  • /home/projects/tszcxf/node_modules/ajv-keywords/dist/keywords/typeof.js
  • /home/projects/tszcxf/node_modules/ajv-keywords/dist/keywords/index.js
  • /home/projects/tszcxf/node_modules/ajv-keywords/dist/index.js
  • /home/projects/tszcxf/node_modules/schema-utils/dist/validate.js
  • /home/projects/tszcxf/node_modules/schema-utils/dist/index.js
  • /home/projects/tszcxf/node_modules/webpack-dev-server/lib/Server.js
  • /home/projects/tszcxf/node_modules/react-scripts/scripts/start.js

I wanted to use this to build a minimal example.

It would be great too if the documentation had a select in the example.

What type of frontend framework are you seeing the problem on?

React

Which version of iX do you use?

v2.4.0

Code to produce this issue.

<IxSelect
          className="w-full is-invalid"
          id={id}
          value={value}
          onValueChange={handleChange}
          defaultValue={defaultValue}
          disabled={disabled}
          autoFocus={autoFocus}
          onBlur={onBlur}
          allowClear={allowClear}
        >
          {options.map((option) => (
            <IxSelectItem
              label={option.label}
              value={option.value}
              key={option.value}
            />
          ))}
        </IxSelect>

tobiask84 avatar Jul 15 '24 11:07 tobiask84

Hello @tobiask84,

could you please clarify what documentation you are referring to?

Currently the ix-select does not support validation. We are already revamping our forms and validation concept, though. Once this is done the select can be integrated with forms and validation. You can check the status via this pull request: #1318

nuke-ellington avatar Jul 18 '24 09:07 nuke-ellington

https://stackblitz.com/edit/tszcxf?file=src%2Fvalidation.tsx

above is the link for the documentation of the validation. it fails with:

Cannot find module 'ajv/dist/compile/codegen' Require stack:

/home/projects/tszcxf/node_modules/ajv-keywords/dist/definitions/typeof.js /home/projects/tszcxf/node_modules/ajv-keywords/dist/keywords/typeof.js /home/projects/tszcxf/node_modules/ajv-keywords/dist/keywords/index.js /home/projects/tszcxf/node_modules/ajv-keywords/dist/index.js /home/projects/tszcxf/node_modules/schema-utils/dist/validate.js /home/projects/tszcxf/node_modules/schema-utils/dist/index.js /home/projects/tszcxf/node_modules/webpack-dev-server/lib/Server.js /home/projects/tszcxf/node_modules/react-scripts/scripts/start.js

tobiask84 avatar Jul 20 '24 14:07 tobiask84

🤖 Hello @tobiask84

Your issue will be analyzed and is part of our internal workflow. To get informed about our workflow please checkout the Contributing Guidelines

JIRA: IX-1500

github-actions[bot] avatar Jul 23 '24 08:07 github-actions[bot]

Is there any news here? Else I would approach UX and explain to them that IX does not support error states for selects. Then the error has to be custom and shown below or so.

tobiask84 avatar Aug 12 '24 14:08 tobiask84

Is there any news here? Else I would approach UX and explain to them that IX does not support error states for selects. Then the error has to be custom and shown below or so.

I linked the pr (feature complete, just some refactorings open and some parts of the documentation)

danielleroux avatar Aug 15 '24 06:08 danielleroux

image

This is version 2.5 of ix. Here is the code in react:

        <IxSelect
          className="is-invalid"
          ...

Is this documented in the docs? I cannot see selects being mentioned here: https://ix.siemens.io/docs/controls/validation

tobiask84 avatar Nov 24 '24 14:11 tobiask84