mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +03:00
[TSK-1368] Remove "Apply" button from filters (#3165)
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>
This commit is contained in:
parent
3d1e1a54ee
commit
cd91d46f18
@ -30,7 +30,6 @@
|
||||
} from '@hcengineering/ui'
|
||||
import { Filter } from '@hcengineering/view'
|
||||
import { FilterQuery } from '@hcengineering/view-resources'
|
||||
import view from '@hcengineering/view-resources/src/plugin'
|
||||
import { createEventDispatcher, onMount } from 'svelte'
|
||||
import tags from '../plugin'
|
||||
import { tagLevel } from '../utils'
|
||||
@ -109,6 +108,11 @@
|
||||
}
|
||||
objects = objects
|
||||
categories = categories
|
||||
|
||||
filter.value = [...selected]
|
||||
// Replace last one with value with level
|
||||
filter.props = { level }
|
||||
onChange(filter)
|
||||
}
|
||||
|
||||
$: schema = filter.key.attribute.schema ?? '0'
|
||||
@ -209,17 +213,6 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
shape={'round'}
|
||||
label={view.string.Apply}
|
||||
on:click={async () => {
|
||||
filter.value = [...selected]
|
||||
// Replace last one with value with level
|
||||
filter.props = { level }
|
||||
onChange(filter)
|
||||
dispatch('close')
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
@ -18,7 +18,6 @@
|
||||
import presentation, { getClient } from '@hcengineering/presentation'
|
||||
import ui, {
|
||||
addNotification,
|
||||
Button,
|
||||
Icon,
|
||||
IconCheck,
|
||||
deviceOptionsStore,
|
||||
@ -140,6 +139,8 @@
|
||||
filter.value = [...filter.value, undefined]
|
||||
}
|
||||
}
|
||||
|
||||
onChange(filter)
|
||||
}
|
||||
|
||||
let search: string = ''
|
||||
@ -216,12 +217,4 @@
|
||||
{/await}
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
shape={'filter'}
|
||||
label={view.string.Apply}
|
||||
on:click={() => {
|
||||
onChange(filter)
|
||||
dispatch('close')
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@
|
||||
import core, { Class, Doc, FindResult, getObjectValue, Ref, SortingOrder, Space } from '@hcengineering/core'
|
||||
import { translate } from '@hcengineering/platform'
|
||||
import presentation, { getClient } from '@hcengineering/presentation'
|
||||
import ui, { Button, Icon, IconCheck, Label, Loading, resizeObserver, deviceOptionsStore } from '@hcengineering/ui'
|
||||
import ui, { Icon, IconCheck, Label, Loading, resizeObserver, deviceOptionsStore } from '@hcengineering/ui'
|
||||
import { Filter } from '@hcengineering/view'
|
||||
import { onMount } from 'svelte'
|
||||
import { getPresenter } from '../../utils'
|
||||
@ -112,6 +112,11 @@
|
||||
selectedValues.add(value)
|
||||
}
|
||||
selectedValues = selectedValues
|
||||
filter.value = [...selectedValues.values()].map((v) => {
|
||||
return [v, [...(realValues.get(v) ?? [])]]
|
||||
})
|
||||
|
||||
onChange(filter)
|
||||
}
|
||||
|
||||
let search: string = ''
|
||||
@ -185,15 +190,4 @@
|
||||
{/await}
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
shape={'filter'}
|
||||
label={view.string.Apply}
|
||||
on:click={() => {
|
||||
filter.value = Array.from(selectedValues.values()).map((p) => {
|
||||
return [p, Array.from(realValues.get(p) ?? [])]
|
||||
})
|
||||
onChange(filter)
|
||||
dispatch('close')
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user