Skip to content

Commit

Permalink
Ensure dropdowns are updated if value changes
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-lindstrom committed Mar 20, 2019
1 parent a87fad2 commit 79d8d14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/controls/dateTimePicker/HoursComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default class HoursComponent extends React.Component<IHoursComponentProps

return (
<Dropdown
key={this.props.value}
disabled={this.props.disabled}
label=""
options={hours}
Expand Down
3 changes: 2 additions & 1 deletion src/controls/dateTimePicker/MinutesComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
export default class MinutesComponent extends React.Component<
ITimeComponentProps,
{}
> {
> {
public render(): JSX.Element {
let minutes: IDropdownOption[] = [];
for (let j = 0; j < 60; j++) {
Expand All @@ -30,6 +30,7 @@ export default class MinutesComponent extends React.Component<

return (
<Dropdown
key={this.props.value}
disabled={this.props.disabled}
label=""
options={minutes}
Expand Down
3 changes: 2 additions & 1 deletion src/controls/dateTimePicker/SecondsComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
export default class SecondsComponent extends React.Component<
ITimeComponentProps,
{}
> {
> {
public render(): JSX.Element {
let seconds: IDropdownOption[] = [];
for (let k = 0; k < 60; k++) {
Expand All @@ -30,6 +30,7 @@ export default class SecondsComponent extends React.Component<

return (
<Dropdown
key={this.props.value}
disabled={this.props.disabled}
label=""
options={seconds}
Expand Down

0 comments on commit 79d8d14

Please sign in to comment.