diff --git a/src/client/src/ts/guild/feeds.ts b/src/client/src/ts/guild/feeds.ts index 886de2d..98a4aa9 100644 --- a/src/client/src/ts/guild/feeds.ts +++ b/src/client/src/ts/guild/feeds.ts @@ -1,11 +1,10 @@ import $ from "jquery"; import "datatables.net-select-dt"; -import DataTable, { Api } from "datatables.net-dt" import HSDropdown from "@preline/dropdown"; import HSOverlay, { IOverlayOptions } from "@preline/overlay"; import HSSelect, { ISelectOptions } from "@preline/select"; import HSDataTable, { IDataTableOptions } from "@preline/datatable"; -import { ConfigColumnDefs, AjaxSettings } from "datatables.net-dt"; +import DataTable, { Api, ConfigColumnDefs, AjaxSettings } from "datatables.net-dt"; import { autoUpdate, computePosition, offset } from "@floating-ui/dom"; import { formatTimestamp, verifyChannels } from "../../../src/ts/main"; import prisma from "../../../../../generated/prisma"; @@ -314,7 +313,7 @@ const pageSelectOptions: ISelectOptions = { `, toggleClasses: "cj-table-paging-select-toggle", optionClasses: "cj-table-paging-select-option", - dropdownClasses: `cj-table-paging-select-dropdown`, + dropdownClasses: "cj-table-paging-select-dropdown", dropdownSpace: 10, dropdownScope: "parent", dropdownPlacement: "top", @@ -348,7 +347,7 @@ interface FeedWithChannels extends prisma.Feed { } const clearEditModalData = () => { - $(editModal.el).data("id", undefined); + $(editModal.el).removeData("id"); $("#formName").val(""); $("#formUrl").val(""); @@ -377,6 +376,7 @@ const openEditModal = async (id: number | undefined) => { // when determining the width of the input placeholder 'Select option...'. This // requires the modal to be opened before running the calculation, which could be // bad. + $("#editForm").removeClass("submitted"); editModal.open(); id === undefined