-
Notifications
You must be signed in to change notification settings - Fork 79
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
setting a number value now renders a real number input #2091
Conversation
foxriver76
commented
Sep 1, 2023
•
edited
Loading
edited
- with min/max/step support
- closes Decimal dot '.' can not be entered in object tab / manual value enter dialogue. #2083
- closes Nicht erlaubte Werte werden im Objekte-Explorer nicht abgelehnt #1099
- with min/max/step support - closes #2083
src/src/dialogs/DiscoveryDialog.tsx
Outdated
if (typeof obj.common.licenseUrl === 'object') { | ||
obj.common.licenseUrl = obj.common.licenseUrl[I18n.getLanguage()] || obj.common.licenseUrl.en; | ||
} | ||
if (obj.common.licenseUrl.includes('github.com')) { |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization
src/src/dialogs/DiscoveryDialog.tsx
Outdated
{devicesProgress >= 99 | ||
? `Lookup services - ${servicesProgress}%` | ||
: `Lookup devices - ${devicesProgress}%`} | ||
{disableScanner && ( |
Check warning
Code scanning / CodeQL
Useless conditional
onChange={e => this.setState({ targetValue: e.target.value })} | ||
onKeyUp={e => e.keyCode === 13 && this.state.valid && this.onUpdate(e)} | ||
onChange={e => { | ||
this.setState({ targetValue: Number(e.target.value), valid: this.isNumberValid({ value: e.target.value, common: this.props.object.common }) }); |
Check warning
Code scanning / CodeQL
Potentially inconsistent state update
@@ -489,7 +529,7 @@ | |||
this.checkJsonError(); | |||
} | |||
|
|||
this.setState({ type: e.target.value }); | |||
this.setState({ type: e.target.value, valid: e.target.value === 'number' ? this.isNumberValid({ value: this.state.targetValue, common: this.props.object.common }) : true }); |
Check warning
Code scanning / CodeQL
Potentially inconsistent state update