Skip to content

Commit d6f2a52

Browse files
committed
feat: add setSelections function
1 parent 1218ce3 commit d6f2a52

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

client/packages/lowcoder/src/comps/comps/tableComp/tableComp.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,18 @@ TableTmpComp = withMethodExposing(TableTmpComp, [
631631
}
632632
},
633633
},
634+
{
635+
method: {
636+
name: "setSelections",
637+
description: "",
638+
params: [
639+
{ name: "rowIds", type: "JSON" }
640+
],
641+
},
642+
execute: (comp, values) => {
643+
comp.children.selection.children.selectedRowKeys.dispatchChangeValueAction(values[0] as string []);
644+
}
645+
},
634646
{
635647
method: {
636648
name: "resetSelections",

server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/user/service/UserServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ protected Map<String, Object> convertConnections(Set<Connection> connections) {
412412
return connections.stream()
413413
.filter(connection -> !AuthSourceConstants.EMAIL.equals(connection.getSource()) &&
414414
!AuthSourceConstants.PHONE.equals(connection.getSource()))
415-
.collect(Collectors.toMap(Connection::getSource, Connection::getRawUserInfo));
415+
.collect(Collectors.toMap(Connection::getAuthId, Connection::getRawUserInfo));
416416
}
417417

418418
protected String convertEmail(Set<Connection> connections) {

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ protected Connection getAuthConnection(AuthUser authUser, User user) {
224224
return user.getConnections()
225225
.stream()
226226
.filter(connection -> authUser.getSource().equals(connection.getSource())
227-
&& connection.getRawId().equals(authUser.getUid()))
227+
&& Objects.equals(connection.getRawId(), authUser.getUid()))
228228
.findFirst()
229229
.get();
230230
}

0 commit comments

Comments
 (0)