How to use the antd.Select.Option function in antd

To help you get started, we’ve selected a few antd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github didilinkin / react-admin-antd / src / modules / WAREHOUSE / containers / ReceiveStatistics.jsx View on Github external
// 仓库管理 - 领用统计
import React, {Component} from 'react'
import {Table, Button, Spin, Input, Select, DatePicker } from 'antd'
import { apiPost } from '../../../api'
// 引入组件
const Option = Select.Option
// React component
class ReceiveStatistics extends Component {
    constructor (props) {
        super(props)
        this.state = {
            loading: false,
            openAdd: false,
            openTableAddUp: false,
            openUpdate: false,
            columns: [],
            dataSource: [],
            RowKeys: [],
            total: 0,
            page: 1,
            rows: 15,
            warehouseId: 0,
github jddunn / frame / frame / src / components / EntryEditForm / EntryEditForm.jsx View on Github external
import openDB from '../../utils/create-db';
import saveToDB from '../../utils/save-db';
import getFromDB from '../../utils/load-db';
import traverseEntriesById from '../../utils/entries-traversal';
import {setState, getState} from '../../utils/session-state';

import
{ toggleExpandedForAll,
    addNodeUnderParent,
    insertNode,
    removeNodeAtPath } from 'react-sortable-tree';

const FormItem = Form.Item;
const { TextArea } = Input;
const Option = Select.Option;

/** Data library / source vars */
const savedSettings = config.savedSettings;
const defaultFLib = savedSettings.defaultLibrary;

const http = require('http');

import localforage from "localforage";

import { HTMLToText } from "../../utils/translate-html";

import { countSentences } from '../../lib/node-nlp-service';


export const EntryEditForm = Form.create()(
  // eslint-disable-next-line
github miansen / tell / tell-front / src / componetns / article / create7.js View on Github external
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import marked from 'marked';
import { Form, Input, Button, Tabs, Select } from 'antd'

import './index.css';
import Axios from '../../axios/axios';
import {openNotificationWithIcon} from "../notification";
const { TextArea } = Input;
const TabPane = Tabs.TabPane;
const Option = Select.Option;
class Create7 extends Component{
    constructor (props) {
        super(props);
        this.state = {
            previewContent: marked(''), //渲染后的正文,
            themes: [], //分类列表
            theme: null //选中的分类
        }
    }

    // 获取分类列表
    componentWillMount(){
        Axios.get("/themes").then(({data}) => {
            if (data.code === 200) {
                this.setState({
                    themes: data.detail
github Weibozzz / next-blog / pages / blog / index.js View on Github external
import {getBlogUrl, getIpUrl, getTotalUrl, getViewUrl, postSaveIpUrl, getCreateTimeUrl} from '../../config';
import {
  pageNum,
  TITLE,
  ARTICLE,
  ALL,
  COMMON_TITLE,
  INDEX_TITLE,
  BLOG_TXT,
  POST_ARTICLE_TYPE
} from '../../config/constantsData';
import MyLayout from '../../components/MyLayout';
import {real_ip, getYearAndMounth, cancelRepeat} from '../../until';
import './index.less'

const Option = Select.Option;
const {Content} = Layout;
const Search = Input.Search;


class Blog extends Component {
  constructor() {
    super()
    this.state = {
      currentPage: 1,
      keyWard: '',
      searchType: TITLE,
      isNotWd: false,
      timeActiveIndex: -1,
      all: '全部文章',
      highLightAll: true
    };
github uuchat / uuchat / src / client / components / console / transcripts / transcripts.js View on Github external
import React, { Component } from 'react';
import { Breadcrumb, Select, Modal, Button, Row, Col } from 'antd';
import Tips from '../../common/tips';
import ChatList from './chatList';
import { getCustomerName, fetchAsync, formatDate } from '../common/utils';
import { saveCSV } from '../common/fileExport';
import TranscriptTable from './transcriptTable';
import { emptyTableLocale } from '../common/constants';

const Option = Select.Option;

export default class Transcripts extends Component {

    state = {
        csSource: [],
        dataSource: [],
        pagination: {},
        filter: [],
        sorter: {}
    };

    getCSSource = async () => {
        try {
            let data = await fetchAsync('/customersuccesses');
            if (data.code !== 200) return Tips.error(data.msg, 4);
github edp963 / davinci / webapp / app / containers / Widget / components / Workbench / ConfigSections / PivotSection.tsx View on Github external
import * as React from 'react'
import { Row, Col, Select } from 'antd'
const Option = Select.Option
import ColorPicker from '../../../../../components/ColorPicker'
import { PIVOT_CHART_FONT_FAMILIES, PIVOT_CHART_FONT_SIZES, PIVOT_CHART_LINE_STYLES } from '../../../../../globalConstants'
const styles = require('../Workbench.less')

export interface IPivotConfig {
  fontFamily: string
  fontSize: string
  color: string
  lineStyle: string
  lineColor: string
  headerBackgroundColor: string
}

interface IPivotSectionProps {
  title: string
  config: IPivotConfig
github thinkjs / pharos / www / static / src / components / Layout / Header / project-selector.js View on Github external
import React from 'react';
import PropTypes from 'prop-types';
import {Icon,Select} from 'antd';
import { config } from 'utils'
import styles from '../index.less'
const Option = Select.Option;

const ProjectSelector = ({site = {}}) => {
  const {sites,onChange,currentSite = {}} = site;
  return (
    <div>
      <select size="small" style="{{">
      {
        (sites || []).map((item,index)=&gt;{
          return(
            <option label="{item.name}" value="{item.id.toString()}">{item.name}</option>      
          )</select></div>
github ant-design / ant-motion / src / edit / template / components / EditView.jsx View on Github external
import { Icon, Tooltip, Input, InputNumber, Select, Switch, Radio } from 'antd';
import { TweenOneGroup } from 'rc-tween-one';
import SketchPicker from 'react-color';
import deepCopy from 'deepcopy';
import InputGroup from './InputGroup';

import webData from '../../../templates/template.config';
import { mergeURLDataToDefault, getRect } from '../../../templates/template/utils';
import {
  getEditID,
  createChildrenObject,
  getChildrenObject,
} from '../utils';

const $ = window.$;
const Option = Select.Option;
const RadioGroup = Radio.Group;
const RadioButton = Radio.Button;
const { TextArea } = Input;

export default class EditView extends React.Component {
  static propTypes = {
    className: PropTypes.string,
    editId: PropTypes.string,
    urlData: PropTypes.object,
    setUrlData: PropTypes.func,
    isMobile: PropTypes.bool,
  };

  static defaultProps = {
    className: 'edit-view',
    setUrlData: () => {
github niyingfeng / antd-auto / src / page / meta.jsx View on Github external
import Reqwest from 'reqwest';

import {
    Button,
    Modal,
    Form,
    message,
    Input,
    Icon,
    Select,
    Popconfirm
} from 'antd';
const FormItem = Form.Item;
const confirm = Modal.confirm;
const Option = Select.Option;
let updateMetas = '';

import apiConfig from '../config/apiConfig';
import Tabler from '../components/table/Tabler';

class Meta extends Component {
    constructor(props) {
        super(props);
        
        this.state = {
            metas: [],
            modalVisiable: false,
            selectValue: ''
        };
        this.addMeta = this.addMeta.bind(this);
        this.handleAdd = this.handleAdd.bind(this);