Skip to content

Commit

Permalink
allow adding properties with tab in the last value
Browse files Browse the repository at this point in the history
  • Loading branch information
kof committed Feb 8, 2025
1 parent 2c46cdc commit eca1cf7
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export const Section = () => {
}}
/>
))}
{isAdding && (
{isAdding ? (
<AddProperty
onSelect={(property) => {
setIsAdding(false);
Expand All @@ -575,6 +575,14 @@ export const Section = () => {
}}
onClose={() => setIsAdding(false)}
/>
) : (
// This empty div allows showing the add property input on tab in the last value
<div
tabIndex={0}
onFocus={() => {
setIsAdding(true);
}}
/>
)}
</Box>
{recentProperties.length > 0 && <Separator />}
Expand Down

0 comments on commit eca1cf7

Please sign in to comment.