 (rum/defc form-tasks < rum/static [tasks]
   [:div.form-view-group
    (comp/form-section "Tasks")
-   (comp/list-table tasks/headers
-                    (filter #(not (= "shutdown" (:state %))) tasks)
-                    tasks/render-item
-                    tasks/render-item-keys
-                    tasks/onclick-handler)])
+   (comp/list-table-auto tasks/headers
+                         (filter #(not (= "shutdown" (:state %))) tasks)
+                         tasks/render-item
+                         tasks/render-item-keys
+                         tasks/onclick-handler)])
 
-(rum/defc form < rum/reactive
-                 init-state-mixin [service]
-  (let [networks (rum/react service-networks)
-        tasks (rum/react service-tasks)
+(rum/defc form < rum/static [data]
+  (let [{:keys [service networks tasks]} data
         ports (:ports service)
         mounts (:mounts service)
         secrets (:secrets service)

                   (message/error
                     (str "Service removing failed. Reason: " (:error response))))}))

(defn- service-tasks-handler
  [service-id]
  (handler/get
    (routes/path-for-backend :service-tasks {:id service-id})
    {:on-success (fn [response]
                   (reset! service-tasks response))}))

(defn- service-networks-handler
  [service-id]
  (handler/get
    (routes/path-for-backend :service-networks {:id service-id})
    {:on-success (fn [response]
                   (reset! service-networks response))}))

(defn- init-state
  [service]
  (service-tasks-handler (:id service))
  (service-networks-handler (:id service)))

(def init-state-mixin
  (mixin/init
    (fn [data]
      (init-state data))))

(rum/defc form-settings < rum/static [service]
  [:div.form-view-group
   (comp/form-section "General settings")

  (:require [material.component :as comp]
            [material.icon :as icon]
            [swarmpit.url :refer [dispatch!]]
            [swarmpit.component.handler :as handler]
            [swarmpit.component.service.form-ports :as ports]
            [swarmpit.component.service.form-networks :as networks]
