mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-10 15:04:25 +08:00
Add data-keep-attribute to reapply attribute on morphdom patch (#978)
This commit is contained in:
parent
358bdb3267
commit
995082b9ab
2 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,10 @@ const callbacks = {
|
|||
if (attr.name.startsWith("data-js-")) {
|
||||
to.setAttribute(attr.name, attr.value);
|
||||
}
|
||||
|
||||
if (attr.name === "data-keep-attribute") {
|
||||
to.setAttribute(attr.value, from.getAttribute(attr.value));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -225,11 +225,13 @@ defmodule LivebookWeb.HomeLive.SessionListComponent do
|
|||
<span class="font-medium">Select all</span>
|
||||
</button>
|
||||
<button class="menu-item text-gray-600" name="disconnect" type="button"
|
||||
data-keep-attribute="disabled"
|
||||
phx-click={set_action("disconnect")}>
|
||||
<.remix_icon icon="shut-down-line" />
|
||||
<span class="font-medium">Disconnect runtime</span>
|
||||
</button>
|
||||
<button class="menu-item text-red-600" name="close_all" type="button"
|
||||
data-keep-attribute="disabled"
|
||||
phx-click={set_action("close_all")}>
|
||||
<.remix_icon icon="close-circle-line" />
|
||||
<span class="font-medium">Close sessions</span>
|
||||
|
|
Loading…
Add table
Reference in a new issue