fix: Dropdown value must be null (not '') for 'no selection' — was throwing Invalid value
This commit is contained in:
1 parent
895b254c2a
commit
e6b5a87f24
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "figma-ai-plugin",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@create-figma-plugin/ui": "^4.0.3",
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ const MIN_WINDOW_SIZE = { width: 320, height: 200 }
|
||||
// very high — actual clamp is done by main via clampWindowSize (bounds*zoom).
|
||||
|
||||
// Full plugin version shown in the footer status bar. Keep in sync with package.json "version".
|
||||
const PLUGIN_VERSION = '0.1.4'
|
||||
const PLUGIN_VERSION = '0.1.5'
|
||||
|
||||
const fieldStyle = {
|
||||
display: 'flex',
|
||||
@@ -176,7 +176,7 @@ function SettingsPanel (props: { settings: Settings, setSettings: (s: Settings)
|
||||
<div style={{ display: 'flex', gap: 'var(--space-4)', alignItems: 'center' }}>
|
||||
<Dropdown
|
||||
placeholder={provider.models.length > 0 ? 'Select model' : 'Fetch models first'}
|
||||
value={provider.defaultModel}
|
||||
value={provider.defaultModel === '' ? null : provider.defaultModel}
|
||||
onValueChange={function (id: string) { patch({ defaultModel: id }) }}
|
||||
options={(provider.models || []).map(function (m) { return { value: m, text: m } })}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user