Skip to content

Commit

Permalink
Merge pull request #9105 from ToolJet/hotfix/tjdb-ux
Browse files Browse the repository at this point in the history
Hotfix: TJDB ux fixes
  • Loading branch information
akshaysasidrn committed Mar 18, 2024
2 parents df70abd + 76cfbdb commit b621ef1
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.33.0
2.33.1
2 changes: 1 addition & 1 deletion frontend/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.33.0
2.33.1
19 changes: 10 additions & 9 deletions frontend/src/TooljetDatabase/Forms/EditRowForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,16 @@ const EditRowForm = ({ onEdit, onClose, rowIdToBeEdited = null }) => {
)}
<span>{headerText}</span>
</div>
<div className="edit-row-dropdown col-auto row-edit-select-container w-100" data-cy="select-row-dropdown">
<Select
isDisabled={true}
useMenuPortal={false}
placeholder="Select a row to edit"
value={selectedRow}
options={options}
onChange={handleOnSelect}
/>

<div className="edit-row-container mb-3">
<div style={{ position: 'relative' }}>
<input
value={selectedRow}
type="text"
disabled={true}
className={!darkMode ? 'form-control' : 'form-control dark-form-row'}
/>
</div>
</div>
</div>

Expand Down
27 changes: 14 additions & 13 deletions frontend/src/TooljetDatabase/Menu/CellEditMenu/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
min-width: 300px;
height: auto;
margin-top: 2px;
inset: 0px auto auto -9px !important;

.tjdb-bool-cell-menu-badge-default {
padding: 2px 12px;
Expand All @@ -15,7 +16,7 @@
}

.boolean-state-selected {
border-color:#3E63DD;
border-color: #3E63DD;
background: var(--indigo3);
color: #3E63DD;
}
Expand All @@ -37,17 +38,17 @@
}

.cell-editmenu-keyActions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 5px;
.leftNav-parent-container,
.rightNav-parent-container {
border-radius: 6px;
border: 1px solid var(--slate7);
width: 24px;
text-align: center;
}
display: flex;
align-items: center;
justify-content: space-between;
gap: 5px;

.leftNav-parent-container,
.rightNav-parent-container {
border-radius: 6px;
border: 1px solid var(--slate7);
width: 24px;
text-align: center;
}
}
}
6 changes: 3 additions & 3 deletions frontend/src/TooljetDatabase/Table/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ const Table = ({ collapseSidebar }) => {
setSelectedRowIds({});
const cellValue = rows[selectedCellRef.current.rowIndex].cells[selectedCellRef.current.columnIndex]?.value;
const isCellValueDefault =
headerGroups[0].headers[selectedCellRef.current.columnIndex]?.column_default === cellValue.toString()
headerGroups[0].headers[selectedCellRef.current.columnIndex]?.column_default === cellValue?.toString()
? true
: false;
setCellVal(cellValue);
Expand All @@ -491,7 +491,7 @@ const Table = ({ collapseSidebar }) => {
rows[selectedCellRef.current.rowIndex].cells[selectedCellRef.current.columnIndex]?.column?.dataType;
if (cellValue === null) {
const isCellValueDefault =
headerGroups[0].headers[selectedCellRef.current.columnIndex]?.column_default === cellValue.toString()
headerGroups[0].headers[selectedCellRef.current.columnIndex]?.column_default === cellValue?.toString()
? true
: false;
setSelectedRowIds({});
Expand Down Expand Up @@ -756,7 +756,7 @@ const Table = ({ collapseSidebar }) => {
['table-editable-parent-cell', 'tjdb-td-wrapper', 'table-cell', 'cell-text'].includes(e.target.classList.value)
) {
const isCellValueDefault =
headerGroups[0].headers[cellIndex]?.column_default === cellVal.toString() ? true : false;
headerGroups[0].headers[cellIndex]?.column_default === cellVal?.toString() ? true : false;
updateCellNavigationRef(rowIndex, cellIndex, true);
setSelectedRowIds({});
setCellVal(cellVal);
Expand Down
2 changes: 1 addition & 1 deletion server/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.33.0
2.33.1

0 comments on commit b621ef1

Please sign in to comment.