bug-fix: user can add values to auto-generated column white creating updating rows (#5189)

This commit is contained in:
Muhsin Shah C P 2023-01-04 21:24:13 +05:30 committed by GitHub
parent f75460e662
commit 6af7987b8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -74,7 +74,8 @@ export const CreateRow = ({ currentState, optionchanged, options, darkMode }) =>
}
const RenderColumnOptions = ({ column, value, id }) => {
const displayColumns = columns.map(({ accessor }) => ({
const filteredColumns = columns.filter(({ isPrimaryKey }) => !isPrimaryKey);
const displayColumns = filteredColumns.map(({ accessor }) => ({
value: accessor,
label: accessor,
}));

View file

@ -184,7 +184,8 @@ export const UpdateRows = ({ currentState, optionchanged, options, darkMode }) =
};
const RenderColumnOptions = ({ column, value, id }) => {
const displayColumns = columns.map(({ accessor }) => ({
const filteredColumns = columns.filter(({ isPrimaryKey }) => !isPrimaryKey);
const displayColumns = filteredColumns.map(({ accessor }) => ({
value: accessor,
label: accessor,
}));