Fix linter issues on frontend (part 3).

This commit is contained in:
Andrey Antukh 2021-06-17 16:06:32 +02:00 committed by Andrés Moya
parent 3e4e54870b
commit 30e77556db
42 changed files with 183 additions and 307 deletions

View file

@ -6,13 +6,13 @@
(ns app.main.ui.components.editable-select
(:require
[rumext.alpha :as mf]
[app.common.uuid :as uuid]
[app.common.data :as d]
[app.common.uuid :as uuid]
[app.main.ui.components.dropdown :refer [dropdown]]
[app.main.ui.icons :as i]
[app.util.dom :as dom]
[app.util.timers :as timers]
[app.main.ui.icons :as i]
[app.main.ui.components.dropdown :refer [dropdown]]))
[rumext.alpha :as mf]))
(mf/defc editable-select [{:keys [value type options class on-change placeholder]}]
(let [state (mf/use-state {:id (uuid/next)
@ -24,7 +24,7 @@
open-dropdown #(swap! state assoc :is-open? true)
close-dropdown #(swap! state assoc :is-open? false)
select-item (fn [value]
(fn [event]
(fn [_]
(swap! state assoc :current-value value)
(when on-change (on-change value))))