InvokeAI/invokeai/frontend/web/src/features
psychedelicious ce3d37e829 fix(ui): handle fields with single option literal
Closes #5616

Turns out the OpenAPI schema definition for a pydantic field with a `Literal` type annotation is different depending on the number of options.

When there is a single value (e.g. `Literal["foo"]`, this results in a `const` schema object. The schema parser didn't know how to handle this, and displayed a warning in the JS console.

 This situation is now handled. When a `const` schema object is encountered, we interpret that as an `EnumField` with a single option.

 I think this makes sense - if you had a truly constant value, you wouldn't make it a field, so a `const` must mean a dynamically generated enum that ended up with only a single option.
2024-02-05 09:15:09 +11:00
..
canvas refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
changeBoardModal refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
controlAdapters refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
deleteImageModal refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
dnd chore(ui): format 2024-01-28 19:57:53 +11:00
dynamicPrompts refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
embedding chore(ui): format 2024-01-28 19:57:53 +11:00
gallery refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
hrf refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
lora refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
modelManager refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
nodes fix(ui): handle fields with single option literal 2024-02-05 09:15:09 +11:00
parameters refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
queue refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
sdxl refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
settingsAccordions fix(ui): hide HRF if SDXL model selected 2024-02-02 11:10:54 +11:00
system refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
ui refactor(ui): refactor reducer list 2024-02-03 07:39:19 -05:00
workflowLibrary chore(ui): lint 2024-02-02 00:20:28 +11:00