Material-uiのTextFieldで入力の削除ボタンをinput内に設置し、onClickイベントを付与したいのですが、やり方に詰まっております。AutoCompleteでタグを使用する方法も考えましたが、複雑な実装にでしたので、タグを使用しない方向で考えております。
イメージとしてはこちらになります。
フォーム内のバツを押すと、イベントが発火するイメージです。
https://mui.com/components/autocomplete/#search-input
どなたかご存知でしたらご教示いただけますと幸いです。
よろしくお願い致します。
(補足)
こちらの記載が参考になりました。
hoshi-takanori様ありがとうございました。
https://github.com/mui-org/material-ui/issues/27630
React.js
1 <TextField 2 label="With normal TextField" 3 id="standard-start-adornment" 4 sx={{ m: 1, width: '25ch' }} 5 InputProps={{ 6 startAdornment: <InputAdornment position="end">kg</InputAdornment>, 7 }} 8 variant="standard" 9 />

回答1件
あなたの回答
tips
プレビュー