Skip to content

Commit

Permalink
Better column width management (Avaiga#2085)
Browse files Browse the repository at this point in the history
resolves Avaiga#2082

Co-authored-by: Fred Lefévère-Laoide <Fred.Lefevere-Laoide@Taipy.io>
  • Loading branch information
FredLL-Avaiga and Fred Lefévère-Laoide authored Oct 18, 2024
1 parent c7ce574 commit 2cdc7ad
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 161 deletions.
55 changes: 26 additions & 29 deletions frontend/taipy-gui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,33 @@
* specific language governing permissions and limitations under the License.
*/

module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
module.exports = {
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
extends: [
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from @typescript-eslint/eslint-plugin
// "plugin:react/jsx-runtime", //using the new JSX transform from React 17
],
plugins: [
"@typescript-eslint",
"react-hooks",
"eslint-plugin-tsdoc"
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
plugins: ["@typescript-eslint", "react-hooks", "eslint-plugin-tsdoc"],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
},
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-expressions": "off", // allows a && b()
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "error", // Checks effect dependencies
"tsdoc/syntax": "off", // "warn" to check tsdoc syntax
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-expressions": "off", // allows a && b()
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "error", // Checks effect dependencies
"tsdoc/syntax": "off", // "warn" to check tsdoc syntax
},
settings: {
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
settings: {
react: {
version: "detect", // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ const AutoLoadingTable = (props: TaipyTableProps) => {
<TableCell
key={`head${columns[col].dfid}`}
sortDirection={orderBy === columns[col].dfid && order}
sx={columns[col].width ? { width: columns[col].width } : {}}
sx={columns[col].width ? { width: columns[col].width } : undefined}
>
{columns[col].dfid === EDIT_COL ? (
[
Expand Down
Loading

0 comments on commit 2cdc7ad

Please sign in to comment.