コード– category –

-
Controlling Material UI v4 Form with React Hook Form v7
In this article, I will show you how to control a Material UI v4 form with React Hook Form v7. Material UI's TextField, Radio, and Select work just fine, but Checkbox requires some tricks and ingenuity.Here is a sample code for your refe... -
Controlling Material UI v4’s Checkbox with React Hook Form v7
In Controlling Material UI's Checkbox with React Hook Form, I introduced how to control Material UI's Checkbox with React Hook Form v6. After that, React Hook Form v7 was released.The way to control Material-UI has changed a little in Re... -
How to use Next.js and Material-UI’s Link together
Next.js links and Material-UI links cannot normally be used together.However, with a little ingenuity, they can be used together. The following are the requirements for the Link component that we will create using Next.js and Material-UI... -
Use material-table in Next.js
Next.js and material-table are very easy to use and I use them a lot.However, they don't work well together, and material-table doesn't work straightforwardly with Next.js. There is a sticking point for using material-table in Next.js, a... -
React Hook Form v7でMaterial UI v4のフォームを制御する
今回はReact Hook Form v7でMaterial UI v4のフォームを制御する方法をご紹介します。 Material UIのTextFieldやRadio、Selectは素直に動いてくれますが、Checkboxはちょっとしたコツ、工夫が必要です。サンプルコードをご紹介しますので是非参考にしてく... -
React Hook Form v7でMaterial UI v4のCheckboxを制御
React Hook FormでMaterial UIのCheckboxを制御でReact Hook Form v6でMaterial UIのCheckboxを制御する方法を紹介しました。 その後、React Hook Form v7がリリースされた。React Hook Form v7でMaterial-UIを制御する方法が少し変わりましたので、Materi... -
Prohibit browser back or warn when reloading or closing tabs
When you are creating a form or something similar, there are times when you don't want the user to browser back, reload, or do anything else. The reason for this is that before the data you enter is saved, it will be lost by browser back... -
TypeError: _this.props.onChangePage is not a function
When I click on the pagination of material-table, I get the following error. Unhandled Runtime Error TypeError: _this.props.onChangePage is not a function The environment in which this error occurs is as follows. material-ui v4.12.2 v5 a... -
TypeError: _this.props.onChangePage is not a function
material-tableのページネーションをクリックすると以下のエラーが出るようになりました。 Unhandled Runtime Error TypeError: _this.props.onChangePage is not a function このエラーが発生する環境は以下の通りです。 material-ui v4.12.2 v5以降mater... -
Next.jsとMaterial-UIのLinkを併用する方法
Next.jsのLinkとMaterial-UIのLinkは通常併用できません。しかし、ちょっとした工夫でこれらを併用できます。 Next.jsとMaterial-UIのLinkを用いて作るリンクのコンポーネントの要件は次のとおりです。 リンクができるNext.jsのLinkが機能するMaterial-UI...