Commit Graph

27 Commits

Author SHA1 Message Date
Jack Fragassi
5fccf67cdc fix: Make Select component fire onChange listener when a selection is pasted in (#25993) 2023-11-16 21:06:05 +01:00
Michael S. Molina
8061d5cce9 fix: Fires onChange when clearing all values of single select (#25853) 2023-11-03 10:35:43 -03:00
Michael S. Molina
7cf96cd843 fix: Duplicate items when pasting into Select (#25447) 2023-09-28 14:11:58 -03:00
Michael S. Molina
b621ee92c9 fix: Duplicated options in Select when using numerical values (#24906) 2023-08-11 14:22:15 -03:00
Michael S. Molina
6089b5fdae fix: Select onChange is being fired without explicit selection (#24698)
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
2023-07-24 13:03:45 -03:00
Michael S. Molina
f2fc4a03dc feat: Changes the Select component to preserve the search value when selecting (#23869) 2023-05-02 09:01:30 -03:00
Michael S. Molina
5e64211bdb fix: Handles disabled options on Select All (#22830) 2023-02-09 08:31:58 -05:00
Michael S. Molina
d479009e35 fix: Unexpected error on simple filter (#22814) 2023-01-23 10:25:28 -05:00
cccs-RyanK
02c9242d68 feat: Select all for synchronous select (#22084)
Co-authored-by: GITHUB_USERNAME <EMAIL>
2023-01-18 07:41:58 -05:00
Kamil Gabryjelski
eb6045adfa feat(native-filters): Adjust filter components for horizontal mode (#22273) 2022-12-01 15:41:19 -05:00
Michael S. Molina
b739e27f6d fix: Duplicated numeric values in Select (#21480) 2022-09-16 08:39:27 -03:00
Michael S. Molina
fbe980779e feat: Adds a helper text option to the Select component (#21269)
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
2022-09-02 08:31:37 -03:00
cccs-RyanK
fe91974163 chore: Remove unecessary code from async and sync select components (#20690)
* Created AsyncSelect Component
Changed files to reference AsyncSelect if needed

* modified import of AsyncSelect, removed async tests and prefixes from select tests

* fixed various import and lint warnings

* fixing lint errors

* fixed frontend test errors

* fixed alertreportmodel tests

* removed accidental import

* fixed lint errors

* updated async select

* removed code from select component

* fixed select test

* fixed async label value and select initial values

* cleaned up async test

* fixed lint errors

* minor fixes to sync select component

* removed unecessary variables and fixed linting

* fixed npm test errors

* fixed linting issues

* fixed showSearch and storybook

* fixed linting
2022-07-28 10:09:37 -03:00
cccs-RyanK
1109fe5fb7 chore: Split Select component into Async and Sync components (#20466)
* Created AsyncSelect Component
Changed files to reference AsyncSelect if needed

* modified import of AsyncSelect, removed async tests and prefixes from select tests

* fixed various import and lint warnings

* fixing lint errors

* fixed frontend test errors

* fixed alertreportmodel tests

* removed accidental import

* fixed lint errors

* updated async select
2022-07-07 15:51:37 -03:00
Antonio Rivero Martinez
8a57a71bed fix(sql lab): Save Dataset Modal Autocomplete should display list when overwritting (#20512)
* Save Dataset Modal:

- Use our Select component as substitute of the Autocomplete one so options are loaded initially without the user having to trigger a search and we are mosre consistent with the rest of the app
- Changing datasetId to lowercase so when custom props get into the DOM we don't get warning related to invalid formatting
- We extracted the dropdown out of the radio because it causes invalid click handling when an option is selected
- Updated tests

* Save Dataset Modal:

- Update missing test for DatasourceControl

* Save Dataset Modal:

- Remove conditional from load options function since only guest users dont have userId, and if that is the case they wont reach this part of the application

* Save Dataset Modal:

- Remove unused comment

* Save Dataset Modal:

- Add getPopupContainer as prop for Select component

* Save Dataset Modal:

- Add tests for our new getPopupContainer prop in Select component. So if passed it gets called.

* Save Dataset Modal:

- use lowercased property when calling post form data

* Save Dataset Modal:

- Update tests so there is no need to define a null returning func

* Save Dataset Modal:

- Including getPopupContainer from PickedSelectProps instead
- Updating definition in SelectFilterPlugin
2022-07-01 14:40:13 -06:00
Michael S. Molina
ca526e63c8 feat: Adds support for clearing the Select cache (#20397)
* feat: Adds support for clearing the Select cache

* Fixes lint errors
2022-06-21 15:13:37 -03:00
Diego Medina
9e58916d93 fix: regression on Select component when handling null values (#19326) 2022-03-23 10:31:38 -03:00
Michael S. Molina
d3ce398448 fix: Don't allow duplicated tag values in the Select (#19283)
* fix: Don't allow duplicated tag values in the Select

* Addresses comments and adds test
2022-03-22 09:05:22 -03:00
Jesse Yang
ae13d8313b feat(select): keep options order when in single mode (#19085) 2022-03-11 13:01:38 -08:00
Jesse Yang
c75f233109 feat(select): sort exact and startsWith match to first (#18856) 2022-03-08 07:08:40 -08:00
Jesse Yang
5a8eb09afb feat: remove loading indicator when typing in select (#18799) 2022-03-03 09:40:49 -08:00
Michael S. Molina
55be249870 fix: Order of Select items when unselecting (#17169)
* fix: Order of Select items when unselecting

* Adds a property comparator that supports strings and numbers

* Uses a named export for propertyComparator
2021-10-25 08:47:01 -03:00
Michael S. Molina
86290cc0e5 chore: Improves the Select component to avoid additional queries when all values have been loaded (#16712)
* chore: Improves the Select component to avoid additional queries when all values have been loaded

* Handles the logic in handlePaginateFetch and removes the use effect
2021-09-15 15:39:58 -03:00
Michael S. Molina
adc3d24c21 fix: Ignore case and special keys when searching (#16706) 2021-09-15 07:33:43 -03:00
Geido
fecd4124fa fix: Select refactoring known issues (#16666)
* Clean up and reorganize effects

* Enhance optionFilterProps

* Render custom label

* Remove prop filtering

* Create options

* Create option from value in single mode

* Change to customLabel

* Show search by default

* Update superset-frontend/src/components/Select/Select.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/components/Select/Select.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/components/Select/Select.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Apply minor changes

* Fixes a bug that was failing CI

* Adds more tests to the component

* Apply customLabel in ColorSchemeControl

* Remove customLabel from rendered Option

* Hide No data when allowNewOptions

* Remove unnecessary prop from tests

* Adjust loading height

* Show no data with fetchOnlyOnSearch

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
Co-authored-by: Michael S. Molina <michael.s.molina@gmail.com>
2021-09-14 17:39:27 +03:00
Michael S. Molina
e9e6c5de8a chore: Writes the tests for the new Select component (#16638)
* chore: Writes the tests for the new Select component

* Uses array destructuring
2021-09-09 08:38:33 -03:00
Michael S. Molina
9c81599d21 chore: Adds the tests that need to be coded for the Select component (#15885) 2021-07-25 21:01:48 +02:00