@rpg-engine/long-bow 0.7.92 → 0.7.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.7.92",
3
+ "version": "0.7.93",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -84,6 +84,11 @@ export const CraftBook: React.FC<IItemCraftSelectorProps> = ({
84
84
  []
85
85
  );
86
86
  const [currentPage, setCurrentPage] = useState(1);
87
+ const [items, setItems] = useState<ICraftableItem[]>(craftablesItems);
88
+
89
+ useEffect(() => {
90
+ setItems(craftablesItems);
91
+ }, [craftablesItems]);
87
92
 
88
93
  useEffect(() => {
89
94
  const handleResize = (): void => {
@@ -136,14 +141,14 @@ export const CraftBook: React.FC<IItemCraftSelectorProps> = ({
136
141
  option: type,
137
142
  }));
138
143
 
139
- const filteredCraftableItems = craftablesItems?.filter(item => {
144
+ const filteredCraftableItems = items?.filter(item => {
140
145
  const matchesSearch = item.name
141
146
  .toLowerCase()
142
147
  .includes(searchTerm.toLowerCase());
143
148
  const matchesCategory =
144
149
  selectedType === 'Suggested' ||
145
150
  (selectedType === 'Pinned' && pinnedItems.includes(item.key)) ||
146
- item.type === selectedType;
151
+ item.subType === selectedType;
147
152
  return matchesSearch && matchesCategory;
148
153
  });
149
154