for the most part switched out the grid's internals for the new table component

This commit is contained in:
Chris Kruining 2024-12-11 16:24:54 +01:00
parent 6d74950495
commit d219ae1f9a
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
8 changed files with 151 additions and 218 deletions

View file

@ -95,19 +95,12 @@ export const Tab: ParentComponent<{ id: string, label: string, closable?: boolea
const context = useTabs();
const resolved = children(() => props.children);
const isActive = context.isActive(props.id);
const [ref, setRef] = createSignal();
// const isActive = context.register(props.id, props.label, {
// closable: props.closable ?? false,
// ref: ref,
// });
return <div
ref={setRef()}
id={props.id}
class={css.tab}
data-tab-label={props.label}
data-tab-closable={props.closable}
style="display: contents;"
>
<Show when={isActive()}>
<Command.Context for={context.onClose() ?? noop} with={[props.id]}>{resolved()}</Command.Context>