Commit 97a4d18 1 parent 96bbfc1 commit 97a4d18 Copy full SHA for 97a4d18
File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 143
143
(assoc-in state [:expanded? {:stable-path [] :value value}] n)
144
144
state))
145
145
146
+ (defn- push-search-text [state {:keys [context] :portal/keys [value]}]
147
+ (let [location (get-location context)
148
+ search-text (get-in state [:search-text location])]
149
+ (assoc state
150
+ :search-text
151
+ (if-not search-text
152
+ {}
153
+ {{:value value :stable-path []} search-text}))))
154
+
146
155
(defn history-push [state {:portal/keys [key value f] :as entry}]
147
156
(-> (push-command state entry)
148
157
(assoc
149
158
:portal/previous-state state
150
159
:portal/key key
151
160
:portal/f f
152
161
:portal/value value
153
- :search-text {}
154
162
:selected (mapv
155
163
(fn [context]
156
164
(-> context
161
169
:alt-bg true )))
162
170
(:selected state)))
163
171
(dissoc :portal/next-state )
172
+ (push-search-text entry)
164
173
(push-viewer entry)
165
174
(push-expanded entry)))
166
175
You can’t perform that action at this time.
0 commit comments