Observable that
Functionappend
A array of new data to be added in this Subject.
Reference to it self.
FunctionappendOne
new data to be added in this Subject.
Reference to it self.
FunctionappendOneAt
new data to be added in this Subject.
index of where to append this data into the Subject.
Reference to it self.
FunctionasObservable
Observable that the State casts to.
FunctioncreateObservablePart
Method to return the part for this Observable to return.
OptionalmemoizationFunction: MemoizationFunction<ReturnType>Method to Compare if the data has changed. Should return true when data is different.
FunctiongetHasOne
the unique value to compare with.
Wether it existed
Functionremove
The unique values to remove.
Reference to it self.
FunctionremoveOne
The unique value to remove.
Reference to it self.
Functionreplace
Reference to it self.
const data = [
	{ key: 1, value: 'foo'},
	{ key: 2, value: 'bar'}
];
const myState = new UmbArrayState(data, (x) => x.key);
const updates = [
	{ key: 1, value: 'foo2'},
	{ key: 3, value: 'bar2'}
];
myState.replace(updates);
// Only the existing item gets replaced:
myState.getValue(); // -> [{ key: 1, value: 'foo2'}, { key: 2, value: 'bar'}]
FunctionsetValue
FunctionupdateOne
Reference to it self.
UmbArrayState
Description
The ArrayState provides methods to append data when the data is an Object.