Websites v4 docs v5.2.5
    Preparing search index...
    • Extension to search-from-param Returns the search object from search-from-params but will also add postcode/location/county data if included in params

      Parameters

      • searchParams: {
            channel?: string;
            county?: string;
            fragment: string | string[];
            location?: string;
            postcode?: string;
            sort?: string;
        }

      Returns Promise<Search>

      const search = await searchFromParamsWithLocation(searchParams);

      search can then be passed wherever a search object is required

      const {
      results: properties,
      pagination,
      errors,
      } = await Property.search({ search, county, location, postcode, branch });

      <SearchSetter
      search={search}
      propertyData={{ results: serializableProperties, pagination: pagination?.toJSON() }}
      />