update version to 1.0.1 with minor fixes.
This commit is contained in:
@@ -29,11 +29,10 @@ const Settings: React.FC = () => {
|
||||
const properties = React.use(cachedFormFieldsProperties(appId));
|
||||
const fileFields = Object.values(properties).filter((property) => property.type === 'FILE');
|
||||
const options: KintonePluginSelectOptionData[] = [
|
||||
{ key: '-', value: '', label: 'Select a File field', disabled: true }, // Default option
|
||||
{ value: '', label: 'Select a File field', disabled: true }, // Default option
|
||||
...fileFields.map((property) => ({
|
||||
key: property.code,
|
||||
value: property.code,
|
||||
label: property.label,
|
||||
label: `${property.label} (${property.code})`,
|
||||
})),
|
||||
];
|
||||
|
||||
@@ -49,8 +48,8 @@ const Settings: React.FC = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleOnChangeTemplate = (e: React.ChangeEvent<HTMLSelectElement>) => {
|
||||
setTemplate(e.target.value);
|
||||
const handleOnChangeTemplate = (value: string) => {
|
||||
setTemplate(value);
|
||||
};
|
||||
|
||||
const handleOnClickCancel = () => {
|
||||
@@ -71,7 +70,7 @@ const Settings: React.FC = () => {
|
||||
No file fields found in the app. Please add a file field to use this plugin.
|
||||
</KintonePluginAlert>
|
||||
) : (
|
||||
<KintonePluginSelect defaultValue={template} onChange={handleOnChangeTemplate} options={options} />
|
||||
<KintonePluginSelect value={template} onChange={handleOnChangeTemplate} options={options} />
|
||||
)}
|
||||
</KintonePluginRow>
|
||||
<KintonePluginRow className={styles.buttons}>
|
||||
|
Reference in New Issue
Block a user