feat: klickar man på en data cell så används datan i cellen för att filtrera KaptenAllocEntries#12
Conversation
|
@lola-cmd nice that you're using semantic commit names :) |
the data in the cell is used to filter the displayed KaptenAllocEntries.
eflisback
left a comment
There was a problem hiding this comment.
One other note: When changing the search query, we want the input element that shows it to be updated. Right now, we're only mapping its output changes to our state value:
input(
typ := "text",
placeholder := "Sök...",
onInput.mapToValue --> searchQuery
),But if we add one more modifier, like this:
input(
typ := "text",
placeholder := "Sök...",
value <-- searchQuery.signal,
onInput.mapToValue --> searchQuery
),it should automatically update the text inside the search field too :)
| cursor: pointer; | ||
| } | ||
|
|
||
| .kapten-alloc-table tbody tr:nth-child(n + 1) span:hover { |
There was a problem hiding this comment.
Why do we need this complex CSS selector? Wouldn't it work with just .kapten-alloc-table tbody tr span:hover?
| searchQuery: Var[String] | ||
| ): HtmlElement = | ||
|
|
||
| def tdFilter(data: String): HtmlElement = { |
There was a problem hiding this comment.
Perhaps consider declaring this function outside the renderTableRow function with the additional parameter searchQuery. I don't know if this applies to Laminar, but for example in React you don't want to declare a component inside another component, as that will lead to the inner component being redeclared each time the outer component re-runs. Do you understand what I mean? Otherwise, very nice.
No description provided.