Skip to content

fix: Dashboard crashes when setting unique filter on pointer field in data browser #2660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/components/BrowserCell/BrowserCell.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export default class BrowserCell extends Component {
this.props.appId,
this.props.value.className
);
let dataValue = this.props.value.id;
let value = this.props.value;
let dataValue = this.props.value.id || this.props.value.objectId;
if (defaultPointerKey !== 'objectId') {
dataValue = this.props.value.get(defaultPointerKey);
if (dataValue && typeof dataValue === 'object') {
Expand All @@ -94,13 +95,13 @@ export default class BrowserCell extends Component {
if (this.props.value && this.props.value.__type) {
const object = new Parse.Object(this.props.value.className);
object.id = this.props.value.objectId;
this.props.value = object;
value = object;
}

content = this.props.onPointerClick ? (
<Pill
value={dataValue}
onClick={this.props.onPointerClick.bind(undefined, this.props.value)}
onClick={this.props.onPointerClick.bind(undefined, value)}
followClick={true}
shrinkablePill
/>
Expand Down
Loading