Utils in Ember FW Table
Utils is short for Utilities, and they are essentially whatever you need them to be. It is simply a way to import a function that does a certain task. In Ember FW Table, we have a few utils which are designed to aid in making very common default cell columns or formats easy to implement. There are two internal utils, which are table and export. You should not need to ever use these outside the addon itself, but they are linked here just in case. The real utils you will use frequently in the apps are the following two utils:
- The Base-Cells Util is designed to give you access to two of the basic and most common cells you will use on a regular basis. It defines for you two functions
rowToggle
andactions
, and while you will not need to use both of these for every table, they are very handy to use frequently. - The Format Util gives an alternative to some of the
cellComponents
linked above as a way of formatting common data which needs to be represented in a way different from the default behavior. This util gives you three formats to choose from:formatBoolean
,formatMoment
, andformatNullable
. These are helpful to reference if you want to quickly format any of those options. These are superior to theircellComponent
alternatives in that they are even easier to implement with a simple import.