Huge refactoring: split readonly and writable stores

This commit is contained in:
Pieter Vander Vennet 2022-06-05 02:24:14 +02:00
parent 0946d8ac9c
commit 4283b76f36
95 changed files with 819 additions and 625 deletions

View file

@ -37,7 +37,6 @@ export default class ReviewForm extends InputElement<Review> {
const comment = new TextField({
placeholder: Translations.t.reviews.write_a_comment.Clone(),
htmlType: "area",
value: this._value.map(r => r?.comment),
textAreaRows: 5
})
comment.GetValue().addCallback(comment => {
@ -62,10 +61,10 @@ export default class ReviewForm extends InputElement<Review> {
new SaveButton(
this._value.map(r => self.IsValid(r)), osmConnection
).onClick(() => {
reviewIsSaving.setData(true),
onSave(this._value.data, () => {
reviewIsSaved.setData(true)
});
reviewIsSaving.setData(true);
onSave(this._value.data, () => {
reviewIsSaved.setData(true)
});
}),
reviewIsSaving
),