fix: clear the last type errors
asChild is a bits-ui v1 prop the icon picker no longer needs -- it already passes a child snippet. The drop zone set both webkitdirectory and a bare directory attribute, which no browser implements. The library view seeds its collection state once by design, so it says so with untrack.
This commit is contained in:
@@ -20,7 +20,13 @@
|
||||
};
|
||||
} = $props();
|
||||
|
||||
const { books, ...filterData } = data;
|
||||
// Seeds the collection state once, deliberately: it owns the list from here on, and the
|
||||
// effect below feeds it later navigations. untrack says so, rather than reading props
|
||||
// outside a closure and being warned about capturing only the initial value.
|
||||
const { books, filterData } = untrack(() => {
|
||||
const { books: initialBooks, ...rest } = data;
|
||||
return { books: initialBooks, filterData: rest };
|
||||
});
|
||||
|
||||
const bookOps = getBookOperationsState();
|
||||
const bookCollection = setBookCollectionState(bookOps, books, filterData);
|
||||
|
||||
Reference in New Issue
Block a user