This pull request involves changes related to issues: #8 #12 and #13 .
The filters state has been adjusted from an array of integers to an array of JS Objects that contain:
int id,
object value (currently nullable) with keys:
string meta
string data
object dataSrc (currently nullable) with keys:
string meta
string data
The deleteFilter function now takes the id to be deleted rather than the int value as it has been previously.
The addFilter function appends a JS Object to filters with:
int id (that is greater than the largest id in the Filters array by 1)
object value (primarily assigned as null)
object dataSrc (primarily assigned as null)
The updateFilter function takes in an id to be updated, an an update object that contains the keys and values to be assigned to the filter. The update object can update one or many values of the filter.
This pull request involves changes related to issues: #8 #12 and #13 .
The
filters
state has been adjusted from an array of integers to an array of JS Objects that contain:id
,value
(currently nullable) with keys:meta
data
dataSrc
(currently nullable) with keys:meta
data
The
deleteFilter
function now takes the id to be deleted rather than the int value as it has been previously.The
addFilter
function appends a JS Object to filters with:id
(that is greater than the largest id in the Filters array by 1)value
(primarily assigned as null)dataSrc
(primarily assigned as null)The
updateFilter
function takes in an id to be updated, an an update object that contains the keys and values to be assigned to the filter. The update object can update one or many values of the filter.For example if the filter is currently:
If the update object is :
the filter becomes:
or if the update object is:
the filter becomes: