Skip to content
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

fix(ui): updated trigger to be onFocus as well as onChange #17161

Merged
merged 2 commits into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
1. [17120](https://github.com/influxdata/influxdb/pull/17120): Fixed cell configuration error that was popping up when users create a dashboard and accessed the disk usage cell for the first time
1. [17097](https://github.com/influxdata/influxdb/pull/17097): Listing all the default variables in the VariableTab of the script editor
1. [17049](https://github.com/influxdata/influxdb/pull/17049): Fixed bug that was preventing the interval status on the dashboard header from refreshing on selections
1. [17161](https://github.com/influxdata/influxdb/pull/17161): Update table custom decimal feature for tables to update table onFocus

## v2.0.0-beta.5 [2020-02-27]

Expand Down
5 changes: 3 additions & 2 deletions ui/src/timeMachine/components/view_options/DecimalPlaces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class DecimalPlacesOption extends PureComponent<Props, State> {
<Input
name="decimal-places"
placeholder="Enter a number"
onFocus={this.handleSetValue}
onChange={this.handleSetValue}
value={this.state.value}
min={MIN_DECIMAL_PLACES}
Expand All @@ -69,8 +70,8 @@ class DecimalPlacesOption extends PureComponent<Props, State> {
)
}

public handleSetValue = (e: ChangeEvent<HTMLInputElement>): void => {
const value = convertUserInputToNumOrNaN(e)
public handleSetValue = (event: ChangeEvent<HTMLInputElement>): void => {
const value = convertUserInputToNumOrNaN(event)
const {digits, onDecimalPlacesChange} = this.props

if (value === value && value >= MIN_DECIMAL_PLACES) {
Expand Down