app/views/lookbook/workbench/_inspector.html.erb in lookbook-0.4.4 vs app/views/lookbook/workbench/_inspector.html.erb in lookbook-0.4.5

- old
+ new

@@ -18,10 +18,15 @@ <% end %> </nav> </div> <div class="flex-auto overflow-auto bg-gray-50"> <% panes.each do |key, props| %> - <div class="flex flex-col h-full relative" x-show="active('<%= key %>')" x-cloak> + <div class="flex flex-col h-full relative" x-show="active('<%= key %>')" x-effect=" + if ($store.inspector.active === '<%= key %>') { + const input = $el.querySelector('[data-param-input]'); + if (input) setTimeout(() => input.focus(), 0) + } + " x-cloak> <% if props[:clipboard].present? %> <%= render "shared/clipboard" do %><%= h props[:clipboard].strip %><% end %> <% end %> <div id="inspector-content-<%= key %>" class="flex flex-col h-full overflow-auto"> <%= render "workbench/inspector/#{props[:template]}", key: key, **props %>