IX Select error states dont work. The documentation is broke too
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.
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>
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
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
🤖 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
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.
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)
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