Skip to content

Commit

Permalink
https://github.com/pyanodon/pybugreports/issues/370
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Jan 15, 2024
1 parent 1b053c7 commit b15adba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version: 2.1.10
Date: 2024-1-??
Changes:
- Add compatibility for Better Victory Screen (stringweasel).
- Fixed pycodex search (https://github.com/pyanodon/pybugreports/issues/370)
---------------------------------------------------------------------------------------------------
Version: 2.1.9
Date: 2024-1-8
Expand Down
6 changes: 4 additions & 2 deletions scripts/wiki/spreadsheet-pages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ local floor = math.floor
local FUN = require '__pycoalprocessing__/prototypes/functions/functions'

local function on_search(search_key, gui)
gui = gui.content
if not gui then return end
if search_key == '' then
for _, row in pairs(gui.children) do
row.visible = true
Expand All @@ -19,7 +21,7 @@ local function update_spreadsheet(gui, player, data, sort_by, asc)
if gui.content then
gui.content.destroy()
end
gui = gui.add{type = 'flow', direction = 'vertical', name = 'content'}
local content = gui.add{type = 'flow', direction = 'vertical', name = 'content'}

local rows = data.rows
local columns = data.columns
Expand All @@ -37,7 +39,7 @@ local function update_spreadsheet(gui, player, data, sort_by, asc)
end)

for _, row in pairs(rows) do
local container = gui.add{type = 'flow', direction = 'vertical', name = row.search_key}
local container = content.add{type = 'flow', direction = 'vertical', name = row.search_key}
local flow = container.add{type = 'flow', direction = 'horizontal', tags = row}
for i, column in pairs(columns) do
local caption = row[column.name].value
Expand Down

0 comments on commit b15adba

Please sign in to comment.