Exemplo n.º 1
0
        public IListViewConfig <TEntity> AddCustomButton <TActionHandler>(Type buttonType, string?label = null, string?icon = null)
            where TActionHandler : IButtonActionHandler
        {
            var button = new CustomButtonConfig(buttonType, typeof(TActionHandler))
            {
                Icon  = icon,
                Label = label
            };

            Buttons.Add(button);

            return(this);
        }
Exemplo n.º 2
0
        public INodeViewConfig <TEntity> AddCustomButton <TActionHandler>(Type buttonType, string?label = null, string?icon = null, Func <IEntity, EntityState, bool>?isVisible = null)
            where TActionHandler : IButtonActionHandler
        {
            var button = new CustomButtonConfig(buttonType, typeof(TActionHandler))
            {
                Icon  = icon,
                Label = label
            };

            button.VisibleWhen(isVisible);

            Buttons.Add(button);

            return(this);
        }