Skip to content

Commit 84cfb58

Browse files
committed
Earthquakes Tutorial: Adjust the table view listeners example #6705
1 parent df76cc7 commit 84cfb58

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

resources/data/deck/learnneo/pages/tutorials/Earthquakes.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ Add this config to the map.
13361336
<pre data-javascript>
13371337
bind: {
13381338
markerStore: 'stores.earthquakes'
1339-
},
1339+
}
13401340
</pre>
13411341
<img style="width:80%" src="https://s3.amazonaws.com/mjs.neo.learning.images/earthquakes/InitialMapWithMarkers.png"></img>
13421342

@@ -1361,13 +1361,17 @@ In this lab you'll set up an event handler for the table and map.
13611361
<details>
13621362
<summary>Add a listener to the table</summary>
13631363

1364-
Tables fire a select event, passing an object that contains a reference to the corresponding row.
1364+
Table Views fire a select event, passing an object that contains a reference to the corresponding row.
13651365

13661366
Add this table config:
13671367

1368+
<pre data-javascript>
1369+
viewConfig: {
13681370
listeners: {
13691371
select: (data) => console.log(data.record)
13701372
}
1373+
}
1374+
</pre>
13711375

13721376
Save and refresh, then click on a table row. If you look at the debugger console you'll see the record being logged.
13731377

@@ -1387,9 +1391,11 @@ After changing the value you should immediately see it reflected in the table ro
13871391

13881392
Now add a `markerClick` listener to the Google Map.
13891393

1390-
listeners: {
1391-
markerClick: data => console.log(data.data.record)
1392-
},
1394+
<pre data-javascript>
1395+
listeners: {
1396+
markerClick: data => console.log(data.data.record)
1397+
}
1398+
</pre>
13931399

13941400
Save, refresh, and confirm that you see the value logged when you click on a map marker.
13951401

0 commit comments

Comments
 (0)