Skip to content

Commit

Permalink
Fix primefaces#3685: TreeSelect inputRef and validation example
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Nov 21, 2022
1 parent 747aa8d commit 262e492
Show file tree
Hide file tree
Showing 17 changed files with 302 additions and 118 deletions.
8 changes: 4 additions & 4 deletions components/doc/autocomplete/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { AutoComplete } from "primereact/autocomplete";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -89,9 +89,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { AutoComplete } from "primereact/autocomplete";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/calendar/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { Calendar } from "primereact/calendar";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -79,9 +79,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { Calendar } from "primereact/calendar";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/checkbox/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { Checkbox } from "primereact/checkbox";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -79,9 +79,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { Checkbox } from "primereact/checkbox";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/colorpicker/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { ColorPicker } from "primereact/inputtext";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -79,9 +79,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { ColorPicker } from "primereact/inputtext";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/dropdown/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { Dropdown } from "primereact/dropdown";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -94,9 +94,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { Dropdown } from "primereact/dropdown";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/inputmask/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { InputMask } from "primereact/inputmask";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -79,9 +79,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { InputMask } from "primereact/inputmask";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/inputnumber/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { InputNumber } from "primereact/inputnumber";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -142,9 +142,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { InputNumber } from "primereact/inputnumber";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/inputtext/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { InputText } from "primereact/inputtext";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -79,9 +79,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { InputText } from "primereact/inputtext";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/inputtextarea/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { InputText } from "primereact/inputtext";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -81,9 +81,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { InputText } from "primereact/inputtext";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/multistatecheckbox/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { MultiStateCheckbox } from "primereact/multistatecheckbox";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -91,9 +91,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { MultiStateCheckbox } from "primereact/multistatecheckbox";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/password/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { Password } from "primereact/password";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -81,9 +81,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { Password } from "primereact/password";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
8 changes: 4 additions & 4 deletions components/doc/radiobutton/validationdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ export function ValidationDoc(props) {
javascript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { RadioButton } from "primereact/radiobutton";
import { classNames } from '../../lib/utils/Utils';
export default function ValidationDemo() {
const [formData, setFormData] = useState({});
Expand Down Expand Up @@ -131,9 +131,9 @@ export default function ValidationDemo() {
typescript: `
import { useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Button } from '../../lib/button/Button';
import { Button } from 'primereact/button';
import { classNames } from 'primereact/utils';
import { RadioButton } from "primereact/radiobutton";
import { classNames } from '../../lib/utils/Utils';
export default function InvalidDemo() {
const [formData, setFormData] = useState<any>({});
Expand Down
Loading

0 comments on commit 262e492

Please sign in to comment.