setfieldshownを利用して、フィールドに特定の文字が含まれた場合にグループフィールドを表示し、それ以外を消すことを行っておりますが、グループフィールドが増える分、フィールドの間隔を保持する部分?が残り、最下部にあるフィールドまでに空白部が増えるのですが、これを解消する方法はあるのでしょうか?
よろしくお願いいたします。
(function () {
"use strict";
//表示非表示
kintone.events.on([
'app.record.create.change.住所',
'app.record.edit.change.住所',
'app.record.create.show',
'app.record.edit.show',
'app.record.detail.show'
], function (event) {
const record = event.record;
const prefectureValue = record['住所']['value'];
//都道府県
const tokyo = prefectureValue.includes('東京都');
const saitama = prefectureValue.includes('埼玉県');
const aichi = prefectureValue.includes('愛知県');
const miyagi = prefectureValue.includes('宮城県');
//グループ表示
kintone.app.record.setFieldShown('東京都', tokyo);
kintone.app.record.setFieldShown('埼玉県', saitama);
kintone.app.record.setFieldShown('愛知県', aichi);
kintone.app.record.setFieldShown('宮城県', miyagi);
});
})();