-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(input-v1): upgrading component #71
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clear button does not work when value is invalid.
ex: input number => type "azerty" => click clear button => nothing happen
packages/stencil/components/input/src/components/osds-input/osds-input.e2e.ts
Outdated
Show resolved
Hide resolved
packages/stencil/components/input/src/components/osds-input/osds-input.e2e.ts
Outdated
Show resolved
Hide resolved
packages/stencil/components/input/src/components/osds-input/osds-input.e2e.ts
Outdated
Show resolved
Hide resolved
packages/stencil/components/input/src/components/osds-input/osds-input.e2e.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type number + hideable: doesn't work as expected with invalid value (for example some text), it is cleared on click
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add TsDoc to attributes here so description will be visible in Specification (Storybook)
actionDescription: 'contrasted', | ||
action: () => el.setProperty('contrasted', true), | ||
}, { | ||
actionDescription: 'disabled', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more test when component is disabled? Disabled only tested with a spinner or with contrasted colours?
packages/stencil/components/input/src/components/osds-input/osds-input.e2e.screenshot.ts
Outdated
Show resolved
Hide resolved
packages/stencil/components/input/src/components/osds-input/osds-input.tsx
Outdated
Show resolved
Hide resolved
packages/stencil/components/input/src/components/osds-input/osds-input.tsx
Outdated
Show resolved
Hide resolved
packages/libraries/core/src/components/input/ods-input-controller.ts
Outdated
Show resolved
Hide resolved
…ry for type: password
packages/libraries/core/src/components/input/ods-input-default-attributes.spec.ts
Outdated
Show resolved
Hide resolved
packages/stencil/components/input/src/components/osds-input/osds-input.e2e.screenshot.ts
Outdated
Show resolved
Hide resolved
@@ -74,7 +74,10 @@ export class OdsInputController extends OdsComponentController<OdsInput> { | |||
return `${forbiddenValue}` === `${this.component.value}`; | |||
} | |||
if (this.component.value) { | |||
return this.component.value >= forbiddenValue.min && this.component.value <= forbiddenValue.max; | |||
if (typeof this.component.value === 'number') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il ne faudrait pas plutot vérifier le this.component.type ?
New properties: