{
    "componentChunkName": "component---src-templates-doc-page-jsx",
    "path": "/angular-data-grid/flashing-cells/",
    "result": {"data":{"markdownRemark":{"htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The grid can flash cells to highlight data changes. This is a great visual indicator to users of the grid who want data changes to be noticed."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To enable cell flashing on data changes for a particular column, set the attribute "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"enableCellChangeFlash=true"}]},{"type":"text","value":" on the column definition."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can also explicitly flash cells using the grid API "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"flashCells(params)"}]},{"type":"text","value":". The params takes a list of columns and rows to flash, the flashDelay and the fadeDelay values e.g. to flash one cell pass in one column and one row that identifies that cell."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-api/api.json","section":"refresh","names":"[\"flashCells\"]"},"children":[]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The example below demonstrates cell flashing. The following can be noted:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"All columns have "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"enableCellChangeFlash=true"}]},{"type":"text","value":" so changes to the columns values will flash."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Clicking "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Update Some Data"}]},{"type":"text","value":" will update a bunch of data. The grid will then flash the cells where data has changed."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Clicking "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Flash One Cell"}]},{"type":"text","value":" provides the API "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"flashCells()"}]},{"type":"text","value":" with one column and one row to flash one cell."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Clicking "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Flash Two Rows"}]},{"type":"text","value":" provides the API "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"flashCells()"}]},{"type":"text","value":" with two row nodes only to flash the two rows."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Clicking "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Flash Two Columns"}]},{"type":"text","value":" provides the API "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"flashCells()"}]},{"type":"text","value":" with two columns only to flash the two columns."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Flashing Data Changes","name":"flashing-data-changes","type":"generated","options":"{  }"},"children":[]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"how-flashing-works","style":"position:relative;"},"children":[{"type":"text","value":"How Flashing Works"},{"type":"element","tagName":"a","properties":{"href":"#how-flashing-works","ariaLabel":"how flashing works permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Each time the call value is changed, the grid adds the CSS class "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ag-cell-data-changed"}]},{"type":"text","value":" for 500ms by default, and then then CSS class "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ag-cell-data-changed-animation"}]},{"type":"text","value":" for 1,000ms by default. The grid provided themes use this to apply a background color."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you want to override the flash background color, this has to be done by overriding the relevant CSS class. There are two ways to change how long a cell remains \"flashed\"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Change the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"cellFlashDelay"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"cellFadeDelay"}]},{"type":"text","value":" configs in the gridOptions"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"When calling "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"flashCells()"}]},{"type":"text","value":", pass the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"flashDelay"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"fadeDelay"}]},{"type":"text","value":" values (in milliseconds) as params."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The example below demonstrates flashing delay changes. The following can be noted:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"cellFlashDelay"}]},{"type":"text","value":" value has been changed to 2000ms, so cells will remain in their \"flashed\" state for 2 seconds."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"cellFadeDelay"}]},{"type":"text","value":" value has been changed to 500ms, so the fading animation will happen faster than what it normally would (1 second)."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Clicking "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Update Some Data"}]},{"type":"text","value":" will update some data to demonstrate the changes mentioned above."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Clicking "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Flash Two Rows"}]},{"type":"text","value":" will pass a custom "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"flashDelay"}]},{"type":"text","value":" of 3000ms and a custom "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"fadeDelay"}]},{"type":"text","value":" delay of 2000ms to demonstrate default values can be overridden."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The example demonstrates how to change the default colour of the flash using the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"--ag-value-change-value-highlight-background-color"}]},{"type":"text","value":" CSS variable."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Changing Flashing Delay","name":"flashing-delay-changes","type":"generated","options":"{  }"},"children":[]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"filtering--aggregations","style":"position:relative;"},"children":[{"type":"text","value":"Filtering & Aggregations"},{"type":"element","tagName":"a","properties":{"href":"#filtering--aggregations","ariaLabel":"filtering  aggregations permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"One exception to the above is changes due to filtering. If you are "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/grouping/"},"children":[{"type":"text","value":"Row Grouping"}]},{"type":"text","value":" the data with "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/aggregation/"},"children":[{"type":"text","value":"Aggregations"}]},{"type":"text","value":", then the aggregated values will change as filtering adds and removes rows contained within the groups. It typically doesn't make sense to flash these changes when it's due to a filter change, as filtering would impact many (possibly all) cells at once, thus not usefully bringing the users attention to any particular cell. If you do not like this exception and would like to flash changes even when it's the result of a filter change, then set grid property "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"allowShowChangeAfterFilter=true"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"flashing-cells-vs-custom-cell-renderers","style":"position:relative;"},"children":[{"type":"text","value":"Flashing Cells vs Custom Cell Renderers"},{"type":"element","tagName":"a","properties":{"href":"#flashing-cells-vs-custom-cell-renderers","ariaLabel":"flashing cells vs custom cell renderers permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Flashing cells is a simple and quick way to visually show to the user that the data has changed. It is also possible to have more intelligent animations by putting animations into custom "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/component-cell-renderer/"},"children":[{"type":"text","value":"Cell Renderers"}]},{"type":"text","value":". Cell Renderers have a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"refresh"}]},{"type":"text","value":" method that gets called when data changes, allowing custom animations to highlight data changes."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The grid comes with two such Cell Renderers for showing data changes which are detailed in the "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/change-cell-renderers/"},"children":[{"type":"text","value":"Change Cell Renderers"}]},{"type":"text","value":" section."}]}],"data":{"quirksMode":false}},"frontmatter":{"title":"Flashing Cells","version":null,"enterprise":null,"sideMenu":null,"description":null},"headings":[{"id":"how-flashing-works","depth":2,"value":"How Flashing Works"},{"id":"filtering--aggregations","depth":2,"value":"Filtering & Aggregations"},{"id":"flashing-cells-vs-custom-cell-renderers","depth":2,"value":"Flashing Cells vs Custom Cell Renderers"}]}},"pageContext":{"frameworks":["javascript","react","angular","vue"],"framework":"angular","srcPath":"/flashing-cells","pageName":"flashing-cells"}},
    "staticQueryHashes": ["1766026005","699667431","940729948"]}