mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-17 14:10:14 +02:00
Subsonic 2, general rework (#758)
This commit is contained in:
@@ -627,7 +627,10 @@ export const useListStore = create<ListSlice>()(
|
||||
|
||||
export const useListStoreActions = () => useListStore((state) => state._actions);
|
||||
|
||||
export const useListStoreByKey = <TFilter>(args: { filter?: Partial<TFilter>; key: string }) => {
|
||||
export const useListStoreByKey = <TFilter>(args: {
|
||||
filter?: Partial<TFilter>;
|
||||
key: string;
|
||||
}): ListItemProps<TFilter> => {
|
||||
const key = args.key as keyof ListState['item'];
|
||||
return useListStore(
|
||||
(state) => ({
|
||||
@@ -644,7 +647,7 @@ export const useListStoreByKey = <TFilter>(args: { filter?: Partial<TFilter>; ke
|
||||
export const useListFilterByKey = <TFilter>(args: {
|
||||
filter?: Partial<TFilter> | any;
|
||||
key: string;
|
||||
}) => {
|
||||
}): TFilter => {
|
||||
const key = args.key as keyof ListState['item'];
|
||||
return useListStore(
|
||||
(state) => {
|
||||
|
||||
Reference in New Issue
Block a user