Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

material ui textfield with chips

import React from "react";
import { Chip, TextField } from "@material-ui/core";
import { Autocomplete } from "@material-ui/lab";

import "./App.css";

export const App: React.FC = () => {
  return (
    <div className="App">
      <Autocomplete
        multiple
        id="tags-filled"
        options={[]}
        freeSolo
        renderTags={(value: string[], getTagProps) =>
          value.map((option: string, index: number) => (
            <Chip
              variant="outlined"
              label={option}
              {...getTagProps({ index })}
            />
          ))
        }
        renderInput={(params) => (
          <TextField
            {...params}
            variant="filled"
            label="freeSolo"
            placeholder="Favorites"
          />
        )}
      />
    </div>
  );
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: express prisma 
Javascript :: javascript constant variable 
Javascript :: css react 
Javascript :: adding a if stement in jsx 
Javascript :: a scroll to div js 
Javascript :: quiz javascript example with array 
Javascript :: react native map 
Javascript :: parsley validation error placement 
Javascript :: jquery validation from data 
Javascript :: vue 3 install eslint 
Javascript :: round to 2 decimal places 
Javascript :: ajax file upload input 
Javascript :: why app.use(cors()) not workin 
Javascript :: use $axios in vuex in nuxt 
Javascript :: angular property value does not exist on type Event 
Javascript :: combine 2 "arrays with objects" and remove object duplicates javascript 
Javascript :: js get class from instance 
Javascript :: clone array 
Javascript :: npm simple zip file creator 
Javascript :: javascript split 
Javascript :: netlify page not found on refresh vuejs vue-router 
Javascript :: javascript on screen width change 
Javascript :: encodeuricomponent reverse 
Javascript :: database in javascript 
Javascript :: paper js text example 
Javascript :: clearinterval javascript 
Javascript :: js content editable 
Javascript :: connect existing database with sequelize 
Javascript :: nested ternarys javascript 
Javascript :: Find the longest string from a given array 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =