mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-03 16:31:32 +02:00
Documenation updates and preparations for 4.0.0 release
This commit is contained in:
@@ -17,7 +17,7 @@ export const ChoiceField: React.FunctionComponent<IChoiceFieldProps> = ({label,
|
||||
onChange(txtValue);
|
||||
};
|
||||
|
||||
const containsSelected = selected && choices.indexOf(selected) !== -1;
|
||||
const containsSelected = crntSelected && choices.indexOf(crntSelected) !== -1;
|
||||
|
||||
return (
|
||||
<div className={`metadata_field`}>
|
||||
@@ -34,7 +34,7 @@ export const ChoiceField: React.FunctionComponent<IChoiceFieldProps> = ({label,
|
||||
onChange={(e) => onValueChange(e.currentTarget.value)}>
|
||||
{ !containsSelected && <option value='' disabled hidden></option> }
|
||||
{choices.map((choice, index) => (
|
||||
<option key={index} value={choice} selected={crntSelected === selected}>{choice}</option>
|
||||
<option key={index} value={choice}>{choice}</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user