Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLUTION: how to make it work on older browsers (Windows 7/8/Chrome v109/Edge v109) #3696

Open
device008 opened this issue Jan 24, 2025 · 0 comments
Labels

Comments

@device008
Copy link

As you know, in Windows 8, the version of Chrome (and Edge) is not updated above version 109.

To Reproduce

  1. Start Chrome v109 (from Windows 7/8, or from oldest phones)
  2. Open react-data-grid-demo
  3. open the built-in debugger and you will see that some css styles are not recognized by the browser.
  4. css_error_screenshot1
    css_error_screenshot2

##Code that causes an error

import 'react-data-grid/lib/styles.css';

Environment

  • react-data-grid version: "react-data-grid": "7.0.0-beta.46" and "react-data-grid": "7.0.0-beta.47".
  • react/react-dom version: "react": "^19.0.0", "react-dom": "^19.0.0".

The solution I propose to make everything work perfectly in Chrome v109:

  1. Rename 'react-data-grid/lib/styles.css' to 'react-data-grid/lib/styles.scss'
  2. import as scss:
import 'react-data-grid/lib/styles.scss';
  1. install sass, or sass-embedded"sass": "^1.83.4",
  2. use vite.config.ts like:
import { defineConfig } from 'vite'
import React from '@vitejs/plugin-react-swc'
import path from 'path'

export default defineConfig({
  css: {
    preprocessorOptions: {
      scss: {
        api: 'modern-compiler'
      },
    },
  },
})
  1. Now everything works in Chrome v109 / Edge v109
@device008 device008 added the Bug label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant