#7 ui triggered POST twice (first for ENTER, second for BLUR)
This commit is contained in:
parent
bc6f0c73b2
commit
929fc4d797
@ -38,11 +38,11 @@ export class BulkService implements ISearchService {
|
|||||||
this.api.subscribe("BulkDto", Bulk.fromJson, next);
|
this.api.subscribe("BulkDto", Bulk.fromJson, next);
|
||||||
}
|
}
|
||||||
|
|
||||||
getById(id: number, next: (results: Bulk) => void, error?: (error: any) => void): void {
|
getById(id: number, next: (results: Bulk) => void): void {
|
||||||
this.api.getReturnItem("bulk/getById/" + id, Bulk.fromJson, next);
|
this.api.getReturnItem("bulk/getById/" + id, Bulk.fromJson, next);
|
||||||
}
|
}
|
||||||
|
|
||||||
searchById(id: number, next: (results: SearchResult) => void, error: (error: any) => void): void {
|
searchById(id: number, next: (results: SearchResult) => void): void {
|
||||||
this.api.getReturnItem("bulk/searchById/" + id, SearchResult.fromJson, next);
|
this.api.getReturnItem("bulk/searchById/" + id, SearchResult.fromJson, next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,9 @@ export class TextComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
finish(): void {
|
finish(): void {
|
||||||
|
if (!this.editing) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.editing = false;
|
this.editing = false;
|
||||||
if (this.value != this.initial) {
|
if (this.value != this.initial) {
|
||||||
this.valueChange.emit(this.value);
|
this.valueChange.emit(this.value);
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package de.ph87.homeautomation.bulk;
|
package de.ph87.homeautomation.bulk;
|
||||||
|
|
||||||
import de.ph87.homeautomation.property.PropertyReader;
|
|
||||||
import de.ph87.homeautomation.shared.ISearchController;
|
import de.ph87.homeautomation.shared.ISearchController;
|
||||||
import de.ph87.homeautomation.shared.SearchResult;
|
import de.ph87.homeautomation.shared.SearchResult;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -18,8 +17,6 @@ public class BulkController implements ISearchController {
|
|||||||
|
|
||||||
private final BulkReader bulkReader;
|
private final BulkReader bulkReader;
|
||||||
|
|
||||||
private final PropertyReader propertyReader;
|
|
||||||
|
|
||||||
@PostMapping("create")
|
@PostMapping("create")
|
||||||
public BulkDto create(@RequestBody final BulkCreateDto dto) {
|
public BulkDto create(@RequestBody final BulkCreateDto dto) {
|
||||||
return bulkWriter.createDto(dto);
|
return bulkWriter.createDto(dto);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user