PluginProbe
WP Ultimate Post Grid / 3.3.0
WP Ultimate Post Grid v3.3.0
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
wp-ultimate-post-grid / assets / js / admin-modal / select / SelectGrid.js

SelectGrid.js in WP Ultimate Post Grid 3.3.0, at assets/js/admin-modal/select/SelectGrid.js

25 lines 604 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React from 'react';
2
3 import { __wpupg } from 'Shared/Translations';
4 import FieldDropdown from '../field/FieldDropdown';
5
6 const SelectGrid = (props) => {
7 let gridOptions = [];
8
9 for ( let grid of wpupg_admin.grids ) {
10 gridOptions.push({
11 value: grid.slug,
12 label: `${ grid.id } - ${ grid.name || 'n/a' }`,
13 });
14 }
15 return (
16 <FieldDropdown
17 value={ props.value }
18 placeholder={ props.placeholder }
19 onChange={ props.onChange }
20 options={gridOptions}
21 />
22 );
23 }
24 export default SelectGrid;
25