uberf-5551: configurable click propagation from edit box (#4674)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev 2024-02-17 02:25:05 +07:00 committed by GitHub
parent 0ad132e7bc
commit b3ae99c537
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,6 +41,7 @@
export let fullSize: boolean = false
export let required: boolean = false
export let uppercase: boolean = false
export let propagateClick: boolean = false
const dispatch = createEventDispatcher()
@ -147,7 +148,11 @@
class:flex-grow={fullSize}
class:w-full={focusable || fullSize}
class:uppercase
on:click|stopPropagation={() => {
on:click={(event) => {
if (!propagateClick) {
event.stopPropagation()
}
input.focus()
}}
use:resizeObserver={(element) => {