File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -259,19 +259,7 @@ update msg model =
259259 )
260260
261261 UpdateEvery amount ->
262- ( { model
263- | rows =
264- List . indexedMap
265- ( \ index row ->
266- if ( index % 10 ) == 0 then
267- { row | label = row. label ++ " !!!" }
268- else
269- row
270- )
271- model. rows
272- }
273- , Cmd . none
274- )
262+ ( { model | rows = List . indexedMap updateRow model. rows }, Cmd . none )
275263
276264 Clear ->
277265 ( { model | rows = [] }, Cmd . none )
@@ -317,6 +305,14 @@ update msg model =
317305 ( { model | seed = Just seed }, Cmd . none )
318306
319307
308+ updateRow : Int -> Row -> Row
309+ updateRow index row =
310+ if index % 10 == 0 then
311+ { row | label = row. label ++ " !!!" }
312+ else
313+ row
314+
315+
320316select : Int -> Int -> Row -> Row
321317select targetIndex index ( { id, label, selected } as row) =
322318 if index == targetIndex then
You can’t perform that action at this time.
0 commit comments