siemens / ix

Siemens Industrial Experience is a design system for designers and developers, to consistently create the perfect digital experience for industrial software products.
https://ix.siemens.io/
MIT License
190 stars 66 forks source link

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

Open tobiask84 opened 1 month ago

tobiask84 commented 1 month ago

Prerequisites

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:

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>
nuke-ellington commented 1 month ago

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

tobiask84 commented 1 month ago

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

github-actions[bot] commented 1 month ago

🤖 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

tobiask84 commented 3 weeks ago

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.

danielleroux commented 3 weeks ago

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)