[ui] fix Editable overflow, disable button unless dirty

feat/vaults
Tomáš Mládek 2022-01-27 17:43:30 +01:00
parent ddfe103e7a
commit ad5cb6036d
No known key found for this signature in database
GPG Key ID: ED21612889E75EC5
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@
import { createEventDispatcher } from "svelte";
import type { IValue } from "upend/types";
import IconButton from "./IconButton.svelte";
import { isEqual } from "lodash";
const dispatch = createEventDispatcher();
export let editable: boolean;
@ -18,6 +19,7 @@
</div>
<IconButton
name="check-circle"
disabled={isEqual(value, newValue)}
on:click={() => dispatch("edit", newValue)}
/>
</div>
@ -33,5 +35,6 @@
.selector {
flex-grow: 1;
min-width: 0;
}
</style>