Exemplo n.º 1
0
 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 });
 }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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);
        }