fix(data-table): prevent selectable datatable with sticky header from jumping (#1230)

Fixes #1228
This commit is contained in:
metonym 2022-04-04 19:37:54 -07:00 committed by GitHub
commit e8da9d7e9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,20 +18,21 @@
export let ref = null; export let ref = null;
</script> </script>
<input <div class:bx--checkbox--inline="{true}">
bind:this="{ref}" <input
type="checkbox" bind:this="{ref}"
class:bx--checkbox="{true}" type="checkbox"
checked="{indeterminate ? false : checked}" class:bx--checkbox="{true}"
indeterminate="{indeterminate}" checked="{indeterminate ? false : checked}"
id="{id}" indeterminate="{indeterminate}"
{...$$restProps} id="{id}"
aria-label="{undefined}" {...$$restProps}
aria-checked="{indeterminate ? 'mixed' : checked}" aria-checked="{indeterminate ? 'mixed' : checked}"
on:change on:change
/> />
<label <label
for="{id}" for="{id}"
title="{title}" title="{title}"
aria-label="{$$props['aria-label']}" aria-label="{$$props['aria-label']}"
class:bx--checkbox-label="{true}"></label> class:bx--checkbox-label="{true}"></label>
</div>