File tree Expand file tree Collapse file tree 4 files changed +4
-3
lines changed Expand file tree Collapse file tree 4 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,8 @@ function App() {
70
70
// 現在の検索条件に基づいて結果を再取得
71
71
if ( selectedCategoryId ) {
72
72
setParts ( dbManager . getPartsWithInventory ( selectedCategoryId ) ) ;
73
- } else if ( keyword && activeTab === 'keyword' ) {
73
+ } else if ( activeTab === 'keyword' ) {
74
+ // キーワード検索タブの場合(キーワード未指定の全検索も含む)
74
75
setParts ( dbManager . getPartsWithInventory ( undefined , keyword ) ) ;
75
76
}
76
77
// どちらでもない場合は結果をクリアしない(現在の状態を維持)
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ export const PartAddModal: React.FC<PartAddModalProps> = ({
174
174
type = "number"
175
175
min = "0"
176
176
step = { field . key === 'price_per_unit' ? '0.01' : '1' }
177
- value = { formData [ field . key as keyof typeof formData ] || '' }
177
+ value = { formData [ field . key as keyof typeof formData ] ?? '' }
178
178
onChange = { ( e ) => handleInputChange ( field . key ,
179
179
field . key === 'price_per_unit'
180
180
? parseFloat ( e . target . value ) || 0
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ export const PartEditModal: React.FC<PartEditModalProps> = ({
149
149
type = "number"
150
150
min = "0"
151
151
step = { field . key === 'price_per_unit' ? '0.01' : '1' }
152
- value = { formData [ field . key as keyof PartWithInventory ] || '' }
152
+ value = { formData [ field . key as keyof PartWithInventory ] ?? '' }
153
153
onChange = { ( e ) => handleInputChange ( field . key ,
154
154
field . key === 'price_per_unit'
155
155
? parseFloat ( e . target . value ) || 0
You can’t perform that action at this time.
0 commit comments