2017 © Pedro Peláez
 

library carbon-field-react-select

Carbon Fields extension, that adds a React_Select field type.

image

nk-o/carbon-field-react-select

Carbon Fields extension, that adds a React_Select field type.

  • Wednesday, June 6, 2018
  • by nk-o
  • Repository
  • 1 Watchers
  • 1 Stars
  • 15 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 36 % Grown

The README.md

Carbon Field React_Select

Added functionality of react-select in Carbon Fields plugin., (*1)

Install

Using Composer:, (*2)

composer require nk-o/carbon-field-react-select

Usage

Default:, (*3)

Field::make( 'react_select', 'alignment', 'Alignment' )
    ->add_options( array(
        'left'    => 'Left',
        'center'  => 'Center',
        'right'   => 'Right',
    ) ),

Icons:, (*4)

Field::make( 'react_select', 'alignment', 'Alignment' )
    ->add_options( array(
        array(
          'icon' => '<svg xmlns="http://www.w3.org/2000/svg">...</svg>',
          'label' => esc_html__( 'Icon 1', '@@text_domain' ),
          'value' => 'icon_1',
        ),
        array(
          'icon' => '<svg xmlns="http://www.w3.org/2000/svg">...</svg>',
          'label' => esc_html__( 'Icon 2', '@@text_domain' ),
          'value' => 'icon_2',
        ),
    ) )
    ->set_props( array(
        'icons' => true,
    ) ),

Available Props:, (*5)

Field::make( 'react_select', 'alignment', 'Alignment' )
    ->add_options( array(
        'left'    => 'Left',
        'center'  => 'Center',
        'right'   => 'Right',
    ) )
    ->set_props( array(
        'clearable'            => true,
        'disabled'             => false,
        'autoFocus'            => false,
        'closeOnSelect'        => true,
        'ignoreAccents'        => true,
        'ignoreCase'           => true,
        'labelKey'             => 'label',
        'multi'                => false,
        'onBlurResetsInput'    => true,
        'onCloseResetsInput'   => true,
        'onSelectResetsInput'  => true,
        'openOnClick'          => true,
        'openOnFocus'          => false,
        'removeSelected'       => true,
        'pageSize'             => 5,
        'rtl'                  => false,
        'scrollMenuIntoView'   => true,
        'searchable'           => true,
        'simpleValue'          => false,
        'tabSelectsValue'      => true,
        'trimFilter'           => false,
        'valueKey'             => 'value',
        'className'            => '',
        'icons'                => false,

        'placeholder'          => 'Select...',
        'clearAllText'         => 'Clear all',
        'clearValueText'       => 'Clear value',
        'noResultsText'        => 'No results found',
        'searchPromptText'     => 'Type to search',
    ) ),

Props descriptions read here - https://github.com/JedWatson/react-select#select-props, (*6)

The Versions

06/06 2018

dev-master

9999999-dev https://nkdev.info/

Carbon Fields extension, that adds a React_Select field type.

  Sources   Download

GPL-2.0+

The Requires

 

wordpress carbon-field carbon-field-react-select react-select

31/03 2018

v1.0.2

1.0.2.0 https://nkdev.info/

Carbon Fields extension, that adds a React_Select field type.

  Sources   Download

GPL-2.0+

The Requires

 

wordpress carbon-field carbon-field-react-select react-select

04/01 2018

v1.0.1

1.0.1.0 https://nkdev.info/

Carbon Fields extension, that adds a React_Select field type.

  Sources   Download

GPL-2.0+

The Requires

 

wordpress carbon-field carbon-field-react-select react-select

03/01 2018

v1.0.0

1.0.0.0 https://nkdev.info/

Carbon Fields extension, that adds a React_Select field type.

  Sources   Download

GPL-2.0+

The Requires

 

wordpress carbon-field carbon-field-react-select react-select