Skip to content

Commit

Permalink
Address review comment - use delayMs
Browse files Browse the repository at this point in the history
  • Loading branch information
toddburnside committed Dec 19, 2024
1 parent bcf7384 commit ecb9eda
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions explore/src/main/scala/explore/targeteditor/SearchForm.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import lucuma.ui.reusability.given
import lucuma.ui.syntax.all.given
import org.scalajs.dom

import scalajs.js.timers
import scalajs.js.JSConverters.*

case class SearchForm(
Expand Down Expand Up @@ -62,7 +61,7 @@ object SearchForm:
(_, inputRef) =>
inputRef.get
.flatMap(
_.foldMap(i => Callback(timers.setTimeout(50)(i.select())))
_.foldMap(i => Callback(i.select()).delayMs(50).toCallback)
)
.when_(props.targetName.get === NewTargetName)
)
Expand Down

0 comments on commit ecb9eda

Please sign in to comment.