#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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@ -28,6 +28,9 @@ export class TextComponent implements OnInit {
|
||||
}
|
||||
|
||||
finish(): void {
|
||||
if (!this.editing) {
|
||||
return;
|
||||
}
|
||||
this.editing = false;
|
||||
if (this.value != this.initial) {
|
||||
this.valueChange.emit(this.value);
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package de.ph87.homeautomation.bulk;
|
||||
|
||||
import de.ph87.homeautomation.property.PropertyReader;
|
||||
import de.ph87.homeautomation.shared.ISearchController;
|
||||
import de.ph87.homeautomation.shared.SearchResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -18,8 +17,6 @@ public class BulkController implements ISearchController {
|
||||
|
||||
private final BulkReader bulkReader;
|
||||
|
||||
private final PropertyReader propertyReader;
|
||||
|
||||
@PostMapping("create")
|
||||
public BulkDto create(@RequestBody final BulkCreateDto dto) {
|
||||
return bulkWriter.createDto(dto);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user