[ui] fix Editable overflow, disable button unless dirty
parent
ddfe103e7a
commit
ad5cb6036d
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue