Methods
ariaManager(order)
It takes a string as an argument and returns a string
Parameters:
Name | Type | Description |
---|---|---|
order |
string | direction to sort |
Returns:
the value of the variable changeOrder.
columnChooseAndSort(data, type, meaning) → {array}
It takes in an array of objects, a string, and another string, and returns the array of objects sorted by the string in ascending or descending order
Parameters:
Name | Type | Description |
---|---|---|
data |
array | the data that you want to sort |
type |
string | the column name that you want to sort by |
meaning |
string | asc or desc |
- Source:
Returns:
- the sorted array
- Type
- array
DataTableReact(props)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
props |
object | props Properties
|
- Source:
paginateData(data, page, value)
It takes in an array, a page number, and a value, and returns an array of the data that should be displayed on that page
Parameters:
Name | Type | Description |
---|---|---|
data |
array | The array of data you want to paginate |
page |
number | The current page number |
value |
number | The number of items you want to display per page. |
- Source:
Returns:
An array of objects
search(array, value, column) → {array}
It takes in an array, a value, and a column, and returns a new array that is filtered based on the value and column
Parameters:
Name | Type | Description |
---|---|---|
array |
array | the array of data to be filtered |
value |
string | the value of the search input |
column |
string | the column name of the data you want to search |
- Source:
Returns:
a new array of employees that match the search criteria.
- Type
- array
tdClassManager(i, column, key) → {string}
If the column is the key and the row is even, return 'darkBold', otherwise if the column is the key and the row is odd, return 'lightBold'
Parameters:
Name | Type | Description |
---|---|---|
i |
number | the index of the row |
column |
string | the column name |
key |
string | the key of the column you want to style |
Returns:
A string defining the style.
- Type
- string
updateResult(employees, selectValue, searchValue, indexOfPages, order, column) → {array}
Updates the list of employees to display on the screen
Parameters:
Name | Type | Description |
---|---|---|
employees |
array | Employées list |
selectValue |
number | number of employees to be displayed on the screen |
searchValue |
string | Value of search field |
indexOfPages |
number | Page number |
order |
string | List order |
column |
string | Column to sort |
- Source:
Returns:
Employees list filtered and at display on the screen
- Type
- array