Git Product home page Git Product logo

material-ui-selectfield's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

material-ui-selectfield's Issues

Forking notice ?

Hi Maximilian

Nice initiative to try by yourself, but wouldnot it be more polite and more inline with opensource mind to make a fork from my project, instead of mounting a new repo and blatantly copy-paste ?

Same with responding in my project's issues with a link here ?

Best regards,

onChange not fired

You probably should write some tests.
When "selectfield" is changed the event "onChange" is not fired on multiple={false}

import React, { Component } from 'react';
import SelectField from 'material-ui-selectfield';

class DropDown extends Component {
    static getElements(items) {
        return items.reduce((nodes, { value, label }) => {
            return [...nodes, <div key={value} value={value} label={label}>{label}</div>];
        }, []);
    };

    render() {
        const props = {
            items: new Array(50).join('0').split('').map(() => {
                return {
                    value: faker.random.uuid(),
                    label: faker.name.firstName(),
                };
            }),
            onChange: () => alert(12),
            multiple: false,
        };
        
        return (
            <SelectField
                checkPosition="left"
                {...rest}
            >
                {DropDown.getElements(items)}
            </SelectField>
        );
    }
}

export default DropDown;

More demo needed

Thanks for the fork.
We still needs more demo of usage.

  1. Async list
  2. Example with loading indicator
  3. Demo form with submit and handling selected values.

Using yarn

ERROR in ./node_modules/material-ui-selectfield/es/SelectField.js
Module not found: Error: Can't resolve 'react-infinite' in '/***/node_modules/material-ui-selectfield/es'

Something is terrible wrong

I tried this against material-ui-superselectfield and your version is working much faster.
vytenis kuciauskas-20171017111236-644x253

Please do not close this fork.

SelectField.js:126 Uncaught TypeError: Cannot read property 'some' of null

This usualy happens then props of component are changed. For example switch "multiple" to true or false and then try to select something from the list

SelectField.js:126 Uncaught TypeError: Cannot read property 'some' of null
    at Object.onClick (SelectField.js:126)
    at Object.ListItem._this.handleTouchTap [as onClick] (ListItem.js:243)
    at EnhancedButton._this.handleTouchTap (EnhancedButton.js:146)
    at Object.ReactErrorUtils.invokeGuardedCallback (ReactErrorUtils.js:69)

Add "Reset" button

If there is a big list of checkboxes some times is "Reset" button needed.
Please add ability to customize footer or just another property with reset button on it.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.