new SelectionSet(completeSet)
Creates an instance of selection set
Parameters:
Name | Type | Description |
---|---|---|
completeSet |
Array.<string> | Set of unique ids. |
Methods
add(ids) → {SelectionSet}
Adds a set of ids to the selection set. This also moves the other rows to exit set.
Parameters:
Name | Type | Description |
---|---|---|
ids |
Array.<(number|string)> | Array of unique ids. |
Returns:
Instance of selection set.
- Type
- SelectionSet
getCompleteSet() → {Array}
Gets all the ids which are either in exit or entry set.
Returns:
Array of unique ids
- Type
- Array
getEntrySet() → {Array.<string>}
Gets the set of ids which are added in the selection set.
Returns:
Array of unique ids
- Type
- Array.<string>
getExistingEntrySet(addSet) → {Array}
Returns a set of unique ids which are already present in entry set.
Parameters:
Name | Type | Description |
---|---|---|
addSet |
Array | Array of unique ids which are added |
Returns:
Array of unique ids which are already in old entry set or new entry set
- Type
- Array
getExistingExitSet(addSet) → {Array}
Returns a set of unique ids which are already present in exit set.
Parameters:
Name | Type | Description |
---|---|---|
addSet |
Array | Array of unique ids which are added |
Returns:
Array of unique ids which are already in old exit set or new exit set
- Type
- Array
getExitSet() → {Array.<string>}
Gets the array of ids which are in the exit set.
Returns:
Array of unique ids
- Type
- Array.<string>
getOldEntry() → {Array.<string>}
Gets the set of ids which are added in the selection set.
Returns:
Array of unique ids
- Type
- Array.<string>
getOldExit() → {Array.<string>}
Gets the set of ids which are added in the selection set.
Returns:
Array of unique ids
- Type
- Array.<string>
remove(ids) → {SelectionSet}
Removes an array of ids from the selection set. It also moves the remaining row ids to entry set.
Parameters:
Name | Type | Description |
---|---|---|
ids |
Array.<string> | Array of unique ids |
Returns:
Instance of selection set
- Type
- SelectionSet
reset(ids) → {SelectionSet}
Resets an array of ids in the selection set to initial state. It sets the value of every unique id value to
null in the selection set which means they are neither in entry set nor in exit set. If no ids are passed,
then it resets all the ids to null.
Parameters:
Name | Type | Description |
---|---|---|
ids |
Array | Array of unique ids. |
Returns:
Instance of selection set.
- Type
- SelectionSet
toggle() → {SelectionSet}
Swaps the add set and remove set in the selection set.
Returns:
Instance of selection set.
- Type
- SelectionSet
update(ids) → {SelectionSet}
Adds an array of ids to the old entry set.
Parameters:
Name | Type | Description |
---|---|---|
ids |
Array.<(number|string)> | Array of unique ids |
Returns:
Instance of selection set.
- Type
- SelectionSet
updateEntry(ids) → {SelectionSet}
Moves all ids which in new entry set to old entry set.
Parameters:
Name | Type | Description |
---|---|---|
ids |
Array.<(number|string)> | Array of unique ids |
Returns:
Instance of selection set.
- Type
- SelectionSet
updateExit(ids) → {SelectionSet}
Moves an array of ids which are in new exit set to old exit set.
Parameters:
Name | Type | Description |
---|---|---|
ids |
Array.<(number|string)> | Array of unique ids. |
Returns:
Instance of selection set.
- Type
- SelectionSet