Columns multiple badge and badges dropdown should have proper width in table component (#5760)

* set min and max width of the custom select dropdown in th table widget

* Removed unwanted console

---------

Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com>
This commit is contained in:
Manish Kushare 2023-03-22 15:50:21 +05:30 committed by GitHub
parent 20a098ec19
commit e3d4ef82f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -2,7 +2,7 @@ import React from 'react';
import SelectSearch from 'react-select-search';
import { useTranslation } from 'react-i18next';
export const CustomSelect = ({ options, value, multiple, onChange, darkMode, isEditable }) => {
export const CustomSelect = ({ options, value, multiple, onChange, darkMode, isEditable, width }) => {
const { t } = useTranslation();
function renderValue(valueProps) {
@ -27,7 +27,7 @@ export const CustomSelect = ({ options, value, multiple, onChange, darkMode, isE
}
return (
<div className="custom-select">
<div className="custom-select" style={{ width: width }}>
<SelectSearch
options={options}
printOptions="on-focus"

View file

@ -321,6 +321,7 @@ export default function generateColumnsData({
}}
darkMode={darkMode}
isEditable={column.isEditable}
width={width}
/>
</div>
);

View file

@ -6862,6 +6862,10 @@ tbody {
.select-search-dark__value::after {
content: none;
}
.select-search-dark__select,.select-search__select{
min-width: fit-content;
max-width: 100% !important;
}
}
.jet-data-table td .textarea-dark-theme.text-container:focus {