mirror of
https://github.com/zhigang1992/devhub.git
synced 2026-06-17 11:11:21 +08:00
Concat new column data with existing data
This commit is contained in:
@@ -41,6 +41,7 @@ export class EventCardsContainer extends PureComponent<
|
||||
|
||||
if (Array.isArray(events)) {
|
||||
const orderedEvents = _(events)
|
||||
.concat(this.state.events)
|
||||
.uniqBy('id')
|
||||
.orderBy(['updated_at', 'created_at'], ['desc', 'desc'])
|
||||
.value()
|
||||
|
||||
@@ -47,6 +47,7 @@ export class NotificationCardsContainer extends PureComponent<
|
||||
if (Array.isArray(notifications)) {
|
||||
this.setState({
|
||||
notifications: _(notifications)
|
||||
.concat(this.state.notifications)
|
||||
.uniqBy('id')
|
||||
.orderBy(
|
||||
['unread', 'updated_at', 'created_at'],
|
||||
|
||||
Reference in New Issue
Block a user