protected virtual void Init(Rect rect, PageFilters filters) { m_Filters = filters?.Clone() ?? new PageFilters(); m_Container.Clear(); DoDisplay(); ApplyFilters(); ShowAsDropDown(rect, GetSize(), new[] { PopupLocation.Below }); }
public bool ClearFilters() { var filters = m_Filters?.Clone() ?? new PageFilters(); filters.status = string.Empty; filters.categories = new List <string>(); filters.labels = new List <string>(); return(UpdateFilters(filters)); }
public virtual bool UpdateFilters(PageFilters filters) { if ((m_Filters == null && filters == null) || (m_Filters?.Equals(filters) ?? false)) { return(false); } m_Filters = filters?.Clone(); onFiltersChange?.Invoke(m_Filters); return(true); }