Пример #1
0
        public IListViewConfig <TEntity> AddDefaultButton(DefaultButtonType type, string?label = null, string?icon = null, bool isPrimary = false)
        {
            var button = new DefaultButtonConfig
            {
                ButtonType = type,
                Icon       = icon,
                Label      = label,
                IsPrimary  = isPrimary
            };

            Buttons.Add(button);

            return(this);
        }
Пример #2
0
        public INodeViewConfig <TEntity> AddDefaultButton(DefaultButtonType type, string?label = null, string?icon = null, bool isPrimary = false, Func <IEntity, EntityState, bool>?isVisible = null)
        {
            var button = new DefaultButtonConfig
            {
                ButtonType = type,
                Icon       = icon,
                Label      = label,
                IsPrimary  = isPrimary
            };

            button.VisibleWhen(isVisible);

            Buttons.Add(button);

            return(this);
        }