selectallbutton

package
v0.0.0-...-1907995 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package selectallbutton provides a Button element that is used in the sidebar of the web UI, to select all the items matching the current search in the web UI. The button is disabled if the current search is not an explicit predicate search (e.g. "tag:foo"), or a container predicate (ref:<blobref>).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(key string, config map[string]string, cbs *Callbacks) react.Element

New returns the button element. It should be used as the entry point, to create the needed React element.

key is the id for when the button is in a list, see https://facebook.github.io/react/docs/lists-and-keys.html

config is the web UI config that was fetched from the server.

cbs is a wrapper around the callback functions required by this component.

Types

type Callbacks

type Callbacks struct {

	// GetQuery returns the current search session predicate.
	GetQuery func() string `js:"getQuery"`

	// SetSelection sets the given selection of blobRefs as the selected permanodes
	// in the web UI.
	SetSelection func(map[string]bool) `js:"setSelection"`
	// contains filtered or unexported fields
}

Callbacks defines the callbacks that must be provided when creating a SelectAllBtn instance.

type SelectAllBtnDef

type SelectAllBtnDef struct {
	react.ComponentDef
}

SelectAllBtnDef defines a React button to select all items matching the current search query.

func (SelectAllBtnDef) OnClick

func (SelectAllBtnDef) Props

Props is an auto-generated proxy to the current props of SelectAllBtn

func (SelectAllBtnDef) Render

func (d SelectAllBtnDef) Render() react.Element

func (SelectAllBtnDef) ShouldComponentUpdateIntf

func (s SelectAllBtnDef) ShouldComponentUpdateIntf(nextProps react.Props, prevState, nextState react.State) bool

type SelectAllBtnElem

type SelectAllBtnElem struct {
	react.Element
}

func SelectAllBtn

func SelectAllBtn(p SelectAllBtnProps) *SelectAllBtnElem

type SelectAllBtnProps

type SelectAllBtnProps struct {
	// contains filtered or unexported fields
}

func (SelectAllBtnProps) EqualsIntf

func (s SelectAllBtnProps) EqualsIntf(val react.Props) bool

func (SelectAllBtnProps) IsProps

func (s SelectAllBtnProps) IsProps()

IsProps is an auto-generated definition so that SelectAllBtnProps implements the myitcv.io/react.Props interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL