Add key attr to log lines
This commit is contained in:
parent
d1663315e3
commit
73f14f38fa
2 changed files with 6 additions and 1 deletions
|
@ -12,6 +12,8 @@ import { BufferType, Status, Unread } from "/state.js";
|
|||
|
||||
const SERVER_BUFFER = "*";
|
||||
|
||||
var messagesCount = 0;
|
||||
|
||||
function parseQueryString() {
|
||||
var query = window.location.search.substring(1);
|
||||
var params = {};
|
||||
|
@ -144,6 +146,9 @@ export default class App extends Component {
|
|||
}
|
||||
|
||||
addMessage(bufName, msg) {
|
||||
msg.key = messagesCount;
|
||||
messagesCount++;
|
||||
|
||||
if (!msg.tags) {
|
||||
msg.tags = {};
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ export default function Buffer(props) {
|
|||
return html`
|
||||
<div class="logline-list">
|
||||
${props.buffer.messages.map((msg) => html`
|
||||
<${LogLine} message=${msg} onNickClick=${props.onNickClick}/>
|
||||
<${LogLine} key=${msg.key} message=${msg} onNickClick=${props.onNickClick}/>
|
||||
`)}
|
||||
</div>
|
||||
`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue