Projekt

Obecné

Profil

« Předchozí | Další » 

Revize ca44ce3d

Přidáno uživatelem Schwobik před téměř 2 roky(ů)

Added grouping by inventory to ListView, loading of other pages of listView implemented
re #10606

Zobrazit rozdíly:

src/components/search/SearchForm.tsx
13 13
import MultiSelect from "./MultiSelect"
14 14
import SwitchWithLabel from "./SwitchWithLabel"
15 15
import { log } from "../../logging/logger"
16
import { setFilterState } from "../../stores/reducers/listViewSlice"
17
import { SearchParams } from "../../api/searchService"
16 18

  
17 19
interface SearchFormProps {
18 20
    isFilterOpen: boolean,
21
    setIsFilterOpen: (isFilterOpen: boolean) => void
19 22
}
20 23

  
21 24

  
......
49 52
    const dispatch = useDispatch<AppDispatch>()
50 53

  
51 54
    const searchSubmit = () => {
52
        dispatch(search({
55
        const filterState: SearchParams = {
53 56
            inventories: selectedInventories.map(i => i.value),
54 57
            nationalities: selectedNationalities.map(n => n.value),
55 58
            artists: selectedArtists.map(a => a.value),
......
64 67
            isCopy,
65 68
            isHighQuality,
66 69
            isLowQuality
67
        }))
70
        }
71
        dispatch(setFilterState(filterState))
72
        dispatch(search(filterState))
73
        props.setIsFilterOpen(false)
68 74
    }
69 75

  
70 76
    const clearForm = () => {

Také k dispozici: Unified diff