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 modelTypeParam = searchParams.get('model_type');
|
||||
if (modelTypeParam) {
|
||||
handleInputChange('model_type', modelTypeParam);
|
||||
const v = Number(modelTypeParam);
|
||||
if (!Number.isNaN(v)) {
|
||||
handleInputChange('model_type', v);
|
||||
}
|
||||
}
|
||||
if (modelParam) {
|
||||
handleInputChange('model', modelParam);
|
||||
|
|
|
|||
Loading…
Reference in New Issue