дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-08 19:02:17 +02:00
⌘F12 / Ctrl+F12 in a focused table editor did nothing. It now opens Go to Column: the table's columns with their types and key icons, filtered as you type (prefix matches first); Enter selects that column's cell in the current row and scrolls the grid to it. File Structure in text editors is unchanged. The grid now also scrolls sideways when arrow keys or the search bar's current match move to a column outside the view.
17 рядки
628 B
TypeScript
17 рядки
628 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { filterColumns } from "./ColumnsPopup";
|
|
|
|
const columns = ["id", "user_id", "name", "created_at", "username"].map((name) => ({ name, type: "TEXT" }));
|
|
|
|
describe("filterColumns", () => {
|
|
it("lists every column for an empty query", () => {
|
|
expect(filterColumns(columns, " ")).toEqual([0, 1, 2, 3, 4]);
|
|
});
|
|
|
|
it("puts prefix matches first, then other matches, ignoring case", () => {
|
|
expect(filterColumns(columns, "US")).toEqual([1, 4]);
|
|
expect(filterColumns(columns, "name")).toEqual([2, 4]);
|
|
expect(filterColumns(columns, "_id")).toEqual([1]);
|
|
});
|
|
});
|