MultiSelect Object extensible bug.

UI Components for React
Post Reply
stefan1968
Posts: 9
Joined: 03 Dec 2017, 22:17

04 Dec 2017, 14:31

I'm using MultiSelect with DataTable and React 16.0.0 it's throwing the following error.
"Uncaught TypeError: Cannot add property _$visited, object is not extensible"

I've also sent an image link for further reference.

I'm not freezing any objects, but its possible React is.

https://ibb.co/jUawnw

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

05 Dec 2017, 19:46

Can you post your code please?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

05 Dec 2017, 19:51

Tomorrow we'll release 1.3.0-RC1, please try with it and define a dataKey on your DataTable.

stefan1968
Posts: 9
Joined: 03 Dec 2017, 22:17

06 Dec 2017, 14:44

I will try.


Your support is first class!

stefan1968
Posts: 9
Joined: 03 Dec 2017, 22:17

07 Dec 2017, 16:08

Still getting this with RC.1.3.0
let header = <div style={{ textAlign: 'left' }}>
<MultiSelect value={this.column_data} options={this.colOptions} onChange={this.onColumnToggle} style={{ width: '250px' }} />
</div>;


<DataTable
dataKey={'data_view_table'}
header={header}
style={{ fontFamily: 'Helvetica Neue' }}
onColumnResizeEnd={() => { this.columnResize(); }}
key={`pdata_table_${this.scroll_size}_${this.state.update}`}
rows={25}
reorderableColumns={true}
paginator={true}
scrollable={true}
resizableColumns={true}
// columnResizeMode="expand"
rowsPerPageOptions={[25, 50, 100]}
value={this.state.rows}
selection={this.state.selected}
scrollHeight={`${this.scroll_size}px`}
onSelectionChange={(e) => this.setState({ selected: e.data })}>
{this.column_data}
</DataTable>


error -

Uncaught TypeError: Cannot add property _$visited, object is not extensible
at Function.equalsByValue (ObjectUtils.js?f7f7:39)
at Function.equals (ObjectUtils.js?f7f7:21)
at MultiSelect.findSelectionIndex (MultiSelect.js?52a9:204)
at MultiSelect.isSelected (MultiSelect.js?52a9:216)
at eval (MultiSelect.js?52a9:363)
at Array.map (<anonymous>)
at MultiSelect.render (MultiSelect.js?52a9:359)
at finishClassComponent (react-dom.development.js?cada:7873)
at updateClassComponent (react-dom.development.js?cada:7850)
at beginWork (react-dom.development.js?cada:8225)

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

20 Dec 2017, 10:13

Can you try with PrimeReact 1.3.0?
If the problem is still exist, please create a plunker (https://plnkr.co/edit/uHHN7wKskRgpHszbPZtj?p=preview)

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

22 Dec 2017, 09:52

Please try using the key property in MultiSelect, it should be a field that uniquely identifies a colOption value in MultiSelect;

Code: Select all

<MultiSelect value={this.column_data} options={this.colOptions} onChange={this.onColumnToggle} style={{ width: '250px' }} key="XXX"/>
How is your colOptions look like?

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests