不適切なフィルター条件を修正

This commit is contained in:
Mouriya
2024-09-17 10:06:46 +09:00
parent 20ca47c004
commit 4eb66684da

View File

@@ -121,7 +121,7 @@ namespace DropDownConfig {
value: fieldData.value,
index: fieldCodeToIndexMap.get(fieldCode),
}))
.filter((item) => item.index !== undefined || item.index !== null)
.filter((item) => item.index !== undefined)
.sort((a, b) => a.index! - b.index!)
)
.forEach((recordArray) => {
@@ -217,9 +217,11 @@ export class CascadingDropDownAction implements IAction {
// ページの状態を処理
async #handlePageState(appId: string) {
// kintoneのパスのパラメータは奇妙に#を使用しているため、ここで標準的な記号に置き換えて、後でURLツールを使用してrequestパラメータを検索しやすくします
const currentState = getPageState(window.location.href.replace('#','?'), appId);
const currentState = getPageState(
window.location.href.replace("#", "?"),
appId
);
switch (currentState.type) {
case "app":
@@ -371,7 +373,9 @@ namespace DropdownContainer {
): void => {
let select;
if (!initSelect) {
select = selects.get(fieldCode)?.querySelector<HTMLSelectElement>("select");
select = selects
.get(fieldCode)
?.querySelector<HTMLSelectElement>("select");
if (!select) {
console.error(
`フィールド ${fieldCode} のドロップダウンメニュー要素が見つかりません`