Showing
1 changed file
with
2 additions
and
2 deletions
| @@ -113,7 +113,7 @@ export const QxFormSelect: React.FC<FormSelectProps> = (props) => { | @@ -113,7 +113,7 @@ export const QxFormSelect: React.FC<FormSelectProps> = (props) => { | ||
| 113 | const [selectOptions, setSelectOptions] = useState([]) | 113 | const [selectOptions, setSelectOptions] = useState([]) |
| 114 | 114 | ||
| 115 | useEffect(() => { | 115 | useEffect(() => { |
| 116 | - console.log(optionId,'llllloptions') | 116 | + console.log(optionId,'llllloptions',options) |
| 117 | if(optionId && !options?.length) { | 117 | if(optionId && !options?.length) { |
| 118 | getAppFromList(optionId).then((res: any)=> { | 118 | getAppFromList(optionId).then((res: any)=> { |
| 119 | if(res?.length){ | 119 | if(res?.length){ |
| @@ -127,7 +127,7 @@ export const QxFormSelect: React.FC<FormSelectProps> = (props) => { | @@ -127,7 +127,7 @@ export const QxFormSelect: React.FC<FormSelectProps> = (props) => { | ||
| 127 | } else { | 127 | } else { |
| 128 | setSelectOptions(options) | 128 | setSelectOptions(options) |
| 129 | } | 129 | } |
| 130 | - }, []); | 130 | + }, [JSON.stringify(options), optionId]); |
| 131 | 131 | ||
| 132 | return <FormSelectMain {...props} options={selectOptions}/> | 132 | return <FormSelectMain {...props} options={selectOptions}/> |
| 133 | }; | 133 | }; |