fix: convert model_type URL param to number so Select matches optionList value type
This commit is contained in:
parent
2165430d87
commit
0d798c2fbc
|
|
@ -591,7 +591,10 @@ const Playground = () => {
|
||||||
const modelParam = searchParams.get('model');
|
const modelParam = searchParams.get('model');
|
||||||
const modelTypeParam = searchParams.get('model_type');
|
const modelTypeParam = searchParams.get('model_type');
|
||||||
if (modelTypeParam) {
|
if (modelTypeParam) {
|
||||||
handleInputChange('model_type', modelTypeParam);
|
const v = Number(modelTypeParam);
|
||||||
|
if (!Number.isNaN(v)) {
|
||||||
|
handleInputChange('model_type', v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (modelParam) {
|
if (modelParam) {
|
||||||
handleInputChange('model', modelParam);
|
handleInputChange('model', modelParam);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue