Improve a few design issues
This commit is contained in:
parent
730fe0a8ea
commit
1c702d5f07
|
@ -45,10 +45,11 @@
|
||||||
onChange(option === value ? null : option)
|
onChange(option === value ? null : option)
|
||||||
close()
|
close()
|
||||||
} else {
|
} else {
|
||||||
if (values.includes(option)) {
|
const sanitizedValues = values.filter(x => options.includes(x))
|
||||||
onChange(values.filter(x => x !== option))
|
if (sanitizedValues.includes(option)) {
|
||||||
|
onChange(sanitizedValues.filter(x => x !== option))
|
||||||
} else {
|
} else {
|
||||||
onChange([...values, option])
|
onChange([...sanitizedValues, option])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -356,7 +356,7 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
.focused .badge span:hover {
|
.focused .values .badge span:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { writable, derived, get } from "svelte/store"
|
import { writable, derived, get } from "svelte/store"
|
||||||
import { tick } from "svelte"
|
import { tick } from "svelte"
|
||||||
import { SheetPadding, GutterWidth } from "../lib/constants"
|
import { SheetPadding, GutterWidth, DefaultRowHeight } from "../lib/constants"
|
||||||
|
|
||||||
export const createStores = () => {
|
export const createStores = () => {
|
||||||
const scroll = writable({
|
const scroll = writable({
|
||||||
|
@ -138,7 +138,7 @@ export const initialise = context => {
|
||||||
const $scroll = get(scroll)
|
const $scroll = get(scroll)
|
||||||
const $bounds = get(bounds)
|
const $bounds = get(bounds)
|
||||||
const $rowHeight = get(rowHeight)
|
const $rowHeight = get(rowHeight)
|
||||||
const verticalOffset = $rowHeight * 1.5
|
const verticalOffset = DefaultRowHeight * 1.5
|
||||||
|
|
||||||
// Ensure vertical position is viewable
|
// Ensure vertical position is viewable
|
||||||
if ($focusedRow) {
|
if ($focusedRow) {
|
||||||
|
|
Loading…
Reference in New Issue