materi ui textfield dengan chip
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>
);
};
Mystic Dev