示例#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);
        }
        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);
        }